F
Filamentβ€’17mo ago
toeknee

requiresConfirmation - Disable Submit?

I need to have two types of requiresConfirmation on the submit button. Basically if X = Y then allow submitting the modal, but if X != Y then we need to show different message instead. Is it possible to conditionally disable the buttons? Best way?
Solution:
Tried that, didn't really work. So I just decided to send a notification which has an action on πŸ™‚
Jump to solution
2 Replies
Patrick Boivin
Patrick Boivinβ€’17mo ago
Not sure it's the best way but I'm thinking you could call ->modalActions(fn ($action) => ...) after ->requiresConfirmation(). Either customize or remove the actions if not applicable?
Solution
toeknee
toekneeβ€’17mo ago
Tried that, didn't really work. So I just decided to send a notification which has an action on πŸ™‚
Want results from more Discord servers?
Add your server