© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
19 replies
Jamie Cee

passing action arguments into nested actions

I have an action with footer actions. In those footer actions I need $arguments from the mountUsing on the parent. Not sure how to obtain those arguments in the child?
Solution
public function dayAction(): Action
{
    return Action::make('day')
        ->label('Day Clicked')
        ->modal()
        ->modalSubmitAction(false)
        ->extraModalFooterActions(function (Action $action): array {
            return [
                Action::make('addAvailability')
                    ->color('success')
                    ->fillForm(fn (): array => [
                        'date' => $action->getArguments()['date'] ?? null,
                        'user' => $action->getArguments()['record'] ?? null,
                    ])
                    ->form([
                        TextInput::make('date'),
                        Select::make('user')
                            ->options([
                                1 => 'User 1',
                                2 => 'User 2',
                            ]),
                    ])
                    ->action(function (array $data) {
                        dd($data);
                    }),
            ];
        });
}
public function dayAction(): Action
{
    return Action::make('day')
        ->label('Day Clicked')
        ->modal()
        ->modalSubmitAction(false)
        ->extraModalFooterActions(function (Action $action): array {
            return [
                Action::make('addAvailability')
                    ->color('success')
                    ->fillForm(fn (): array => [
                        'date' => $action->getArguments()['date'] ?? null,
                        'user' => $action->getArguments()['record'] ?? null,
                    ])
                    ->form([
                        TextInput::make('date'),
                        Select::make('user')
                            ->options([
                                1 => 'User 1',
                                2 => 'User 2',
                            ]),
                    ])
                    ->action(function (array $data) {
                        dd($data);
                    }),
            ];
        });
}


and use
$this->mountAction('day', ['date' => now(), 'record' => 1])
$this->mountAction('day', ['date' => now(), 'record' => 1])
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Replace mounted action passing arguments
FilamentFFilament / ❓┊help
3y ago
Action shows view with nested actions?
FilamentFFilament / ❓┊help
3y ago
Nested modal actions inside Infolist action modal not opening
FilamentFFilament / ❓┊help
4mo ago
Reusing Action arguments in Livewire Action
FilamentFFilament / ❓┊help
17mo ago