FilamentF
Filament3y ago
xy

Add action button to form

I'd like to add an action button in the form of a resource. The idea is to use that action method to import details from a model upon clicking it.

    public static function form(Form $form): Form
    {
        return $form
            ->schema([

             // Add action here 
            ]);
    }


I've tried
Action::make('edit')->button()


in a Section component which results in the following error:

 Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Filament\Actions\Action given
Was this page helpful?