© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
21 replies
eazy

Open an action from another action

I have the following InfoListAction:
Actions::make([
    Action::make('close_configuration')
        ->extraModalFooterActions(fn(Action $action): array => [
            $action
                ->makeModalSubmitAction('createAnother', arguments: ['another' => true])
                ->label(__('machine-configurations.close and create new'))
                ->color('success'),
        ])
        ->requiresConfirmation()
        ->action(function (Machine $record, array $arguments, CloseMachineConfiguration $closeMachineConfiguration, Action $action) {
            if ($record->activeMachineConfiguration === null) {
                return false;
            }

            $closed = $closeMachineConfiguration($record->activeMachineConfiguration);

            if (!$closed) {
                $action->sendFailureNotification();
            }

            if ($closed) {
                $action->sendSuccessNotification();
            }

            if (isset($arguments['another']) && $arguments['another']) {

            }

            return $closed;
        })
])->fullWidth()
Actions::make([
    Action::make('close_configuration')
        ->extraModalFooterActions(fn(Action $action): array => [
            $action
                ->makeModalSubmitAction('createAnother', arguments: ['another' => true])
                ->label(__('machine-configurations.close and create new'))
                ->color('success'),
        ])
        ->requiresConfirmation()
        ->action(function (Machine $record, array $arguments, CloseMachineConfiguration $closeMachineConfiguration, Action $action) {
            if ($record->activeMachineConfiguration === null) {
                return false;
            }

            $closed = $closeMachineConfiguration($record->activeMachineConfiguration);

            if (!$closed) {
                $action->sendFailureNotification();
            }

            if ($closed) {
                $action->sendSuccessNotification();
            }

            if (isset($arguments['another']) && $arguments['another']) {

            }

            return $closed;
        })
])->fullWidth()

Now when the
another
another
argument is set I want to open another action that is declared down later on
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

How to trigger an action from another action?
FilamentFFilament / ❓┊help
14mo ago
How to Open Another Modal from Action Modal?
FilamentFFilament / ❓┊help
3y ago
Custom action to open create action of different resource from another resource
FilamentFFilament / ❓┊help
3y ago
Open a Modal from inside of an Action
FilamentFFilament / ❓┊help
2y ago