F
Filament10mo ago
Jo

Confirmation modal for actions other than delete?

Consider a situation where users of our panel have to "spend" a point/credit in order to create a new post. In this case, I can modify the example from the docs for a delete confirmation to be like this:
Action::make('create')
->action(fn (Post $record) => $record->create())
->requiresConfirmation()
Action::make('create')
->action(fn (Post $record) => $record->create())
->requiresConfirmation()
The problem with this, though, is that the confirmation modal appears before form validation has happened. I'd like to switch this around so that the form validation happens first and then the confirmation modal only first if the form passes validation.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server