Validate filament form without submitting
Hello guys, im trying to make a big form that has a really custom design, and this form would have multiple steps. But instead of using a single filament form with the step wizard, i went with 5 forms in the same page. This way i could write the step logic myself, using buttons and a step variable to determine which form to show based on the current step, so i could customize the design of the stepper entirely.
The problem now is that i can't seem to get the filament forms to validate separately when going to the next step. Trying to submit them using a form action gives a dd() kind of error message instead of just making the red text appear under each field. I assume this is because i don't have any function for the form to do in the form action. I would need just some sort of formaction that only does the validation and nothing else.
The forms all have their own validation rules, and at the last step i use the data variables in php to gather all of the users answers from the multiple form and do what i need with them. I have a different form variable and data variable in my page for each step, and they are defined properly using getForms() and statePath
The problem now is that i can't seem to get the filament forms to validate separately when going to the next step. Trying to submit them using a form action gives a dd() kind of error message instead of just making the red text appear under each field. I assume this is because i don't have any function for the form to do in the form action. I would need just some sort of formaction that only does the validation and nothing else.
The forms all have their own validation rules, and at the last step i use the data variables in php to gather all of the users answers from the multiple form and do what i need with them. I have a different form variable and data variable in my page for each step, and they are defined properly using getForms() and statePath
Solution
This will validate the forms
$this->form1->getState()$this->form2->getState()