© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Bleak (GDB Founder)

Open Confirmation Modal before allowing user to Create a new record

Hi all it seems the CreateAction doesnt allow a confirmation modal before showing the user the create form, does anyone know how i could do this?
Thanks in advance
Solution
Got it
Action::make('create')


                ->action(function ($record){
                        return redirect(SiteResource::getURL('create',['tenant'=>Filament::getTenant()]));
                    })
                ->requiresConfirmation()
                ->modalDescription('Before creating a site, please ensure it doesnt already exist in our system by searching for it first under the All Sites Tab.')
                ->modalHeading('Create a new Site')
                ->modalSubmitActionLabel('I checked! Create new Site')
        ];
    }
Action::make('create')


                ->action(function ($record){
                        return redirect(SiteResource::getURL('create',['tenant'=>Filament::getTenant()]));
                    })
                ->requiresConfirmation()
                ->modalDescription('Before creating a site, please ensure it doesnt already exist in our system by searching for it first under the All Sites Tab.')
                ->modalHeading('Create a new Site')
                ->modalSubmitActionLabel('I checked! Create new Site')
        ];
    }
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

Open modal before create action
FilamentFFilament / ❓┊help
3y ago
Open Modal after/before Creating record
FilamentFFilament / ❓┊help
9mo ago
Confirmation modal before action.
FilamentFFilament / ❓┊help
3y ago