Disable submit button in a Wizard depend on "accept" checkbox

Hello there Some help is needed here. I have a livewire component using Form package. There is a wizard in the form and I need that a checkbox must be checked before the form is submitted. I am using ->submitAction() but I don't Know how disable the button until the check box is checked. I will appreciate community help Thanks in advance
No description
Solution:
Maybe in the form you can use a Checkbox?
Checkbox::make('terms_of_service')
->accepted()
Checkbox::make('terms_of_service')
->accepted()
...
Jump to solution
4 Replies
Juan Duarte Molina
Juan Duarte MolinaOP10mo ago
Any help .. will be appreciated... 😀 🥺
Solution
BOT_Larry
BOT_Larry10mo ago
Maybe in the form you can use a Checkbox?
Checkbox::make('terms_of_service')
->accepted()
Checkbox::make('terms_of_service')
->accepted()
from https://filamentphp.com/docs/3.x/forms/fields/checkbox#accepted-validation
BOT_Larry
BOT_Larry10mo ago
O i saw, ->accepted() also works on a toggle!
Toggle::make('terms_of_service')
->accepted()
Toggle::make('terms_of_service')
->accepted()
Juan Duarte Molina
Juan Duarte MolinaOP10mo ago
Thanks! Silly me ! I was focus on disable the button. And the solution was as simple as that Thank you again
Want results from more Discord servers?
Add your server