F
Filamentβ€’2y 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β€’2y 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β€’2y ago
Tried that, didn't really work. So I just decided to send a notification which has an action on πŸ™‚

Did you find this page helpful?