FilamentF
Filament9mo ago
Mocus

custom page form from resource

hi just want abit of advice i've added the element to my custom page:

 <form wire:submit.prevent="submit">
        {{ $this->form }}
    </form>


and my custom page implements hasforms and use interactWithForms instead of creating a whole chunk of code in the Page like, which render fine ... :

    public function form(Form $form): Form
    {
        return $form
            ->schema([
                TextInput::make('title')
                    ->required(),
                // ...
            ])
            ->statePath('data');
    }


can i pull the form from my resource?
Was this page helpful?