Form Wizard save to db on each step

I have a Wizard form component with 5 steps. Currently all field values are saved to db only when clicking on the submit button at the last step. I need to save the current step's data only into db on clicking on the next button in each Step
3 Replies
slamx_
slamx_16mo ago
You can use a event emitter, but why you want to store the data before?
toeknee
toeknee16mo ago
You can do it on afterStateValidated, then on the next step you can access that data, and then handle a store etc, then override the main submit for a validate and then redirect.
LeandroFerreira
LeandroFerreira16mo ago
You can use ->afterValidation()
Want results from more Discord servers?
Add your server