© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
Thijmen

Action in Form

I've copied this code from the docs but am getting a error. I've tried to switch action classes but that doesnt solve it
https://filamentphp.com/docs/3.x/forms/actions#defining-a-form-component-action
\Filament\Forms\Components\Actions\Action::make('resetStars')
                                    ->icon('heroicon-m-x-mark')
                                    ->color('danger')
                                    ->requiresConfirmation()
                                    ->action(function () {

                                    }),
\Filament\Forms\Components\Actions\Action::make('resetStars')
                                    ->icon('heroicon-m-x-mark')
                                    ->color('danger')
                                    ->requiresConfirmation()
                                    ->action(function () {

                                    }),

Error:
Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Filament\Forms\Components\Actions\Action given
Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Filament\Forms\Components\Actions\Action given
Actions - Form Builder - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Form in Action
FilamentFFilament / ❓┊help
4mo ago
Form action
FilamentFFilament / ❓┊help
16mo ago
Form in Global Search Action
FilamentFFilament / ❓┊help
3y ago
Reset form data in action
FilamentFFilament / ❓┊help
3y ago