© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Hugo

Confirmation modal before action.

Im trying to show a confirmation modal after pressing the submit button.
At the moment it looks like this:
Action::make('generate_recap')
                ->label(__('events.recap.actions.create'))
                ->icon('fluentui-document-pdf-24-o')
                ->form(static::createRecapForm())
                ->action(function($data){
                    $client = Client::query()->where('id', $data['client_id'])->first();
                    (new PDFGenerator($data['client_id'],$data['delivery_address_id'], $data['month'], strval($data['year']), $data['contract']))->generateRecap();
                }),
Action::make('generate_recap')
                ->label(__('events.recap.actions.create'))
                ->icon('fluentui-document-pdf-24-o')
                ->form(static::createRecapForm())
                ->action(function($data){
                    $client = Client::query()->where('id', $data['client_id'])->first();
                    (new PDFGenerator($data['client_id'],$data['delivery_address_id'], $data['month'], strval($data['year']), $data['contract']))->generateRecap();
                }),

Adding an extraModalFooterAction and putting the submitAction to false could be a solution and i've tried it. The problem im running into is that I cant access the $data coming from the parent form.
If I could access that $data I could probably execute the action I want upon confirming.

What im looking for is:
I have the action that I posted with my form.
When I press the submit button I want a confirmation Modal to show.
Upon confirming that modal I want to execute the action with the $data from the form.
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

Confirmation modal before Sign out
FilamentFFilament / ❓┊help
3y ago
ToggleColumn and Modal Confirmation (Action?)
FilamentFFilament / ❓┊help
3y ago
Modal confirmation before click save button in modal
FilamentFFilament / ❓┊help
15mo ago
Require confirmation modal on submit action
FilamentFFilament / ❓┊help
2y ago