How do you make the submit button of a form wizard do a require confirmation dialog?

Currently in the docs, to add a submit button, I have to do this:
Wizard::make([
// ...
])->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="sm"
>
Submit
</x-filament::button>
BLADE)))
Wizard::make([
// ...
])->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="sm"
>
Submit
</x-filament::button>
BLADE)))
But it seem like there is no way for me to add a ->requiresConfirmation to the submit button to give some warning before they confirm again to submit
3 Replies
Mohamed Ayaou
Mohamed Ayaou2w ago
no idea but maybe you can move the submit button to a modal? I didn't try that btw: https://filamentphp.com/docs/3.x/support/blade-components/modal
pocket.racer
pocket.racerOP2w ago
hmm not really sure what u mean
Mohamed Ayaou
Mohamed Ayaou2w ago
I mean instead of putting a button in the submitAction you may put a confirmation modal, the confirm button inside it is the submit button

Did you find this page helpful?