© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
18 replies
Abi

action method not working on a standalone Action

I have the following code and the
action
action
method doesn't get executed.
Action::make('addToCart')
            ->label('ADD PLAYERS TO CART')
            ->modalHeading('Add Players to Cart')
            ->modalWidth('2xl')
            ->modalSubmitActionLabel('Add Players to Cart')
            ->modalFooterActionsAlignment('end')
            ->form([
                Select::make('existing_kids')
                    ->label('Select existing kids information previously added')
                    ->required()
                    ->multiple()->options($this->getFamilyMembers()),
            ])->action(fn($data) => function () {
                ray($this->form->getState());
            });
Action::make('addToCart')
            ->label('ADD PLAYERS TO CART')
            ->modalHeading('Add Players to Cart')
            ->modalWidth('2xl')
            ->modalSubmitActionLabel('Add Players to Cart')
            ->modalFooterActionsAlignment('end')
            ->form([
                Select::make('existing_kids')
                    ->label('Select existing kids information previously added')
                    ->required()
                    ->multiple()->options($this->getFamilyMembers()),
            ])->action(fn($data) => function () {
                ray($this->form->getState());
            });

and the blade content is the following
{{ ($this->addToCartAction)(['productId'=>$item->id])}}
{{ ($this->addToCartAction)(['productId'=>$item->id])}}
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

Additional validations on the `action` method for Standalone action
FilamentFFilament / ❓┊help
3y ago
Utility Injection on action method not working
FilamentFFilament / ❓┊help
3y ago
Standalone action not hiding
FilamentFFilament / ❓┊help
3y ago
Action authorize() method not working
FilamentFFilament / ❓┊help
6mo ago