Wondering if you had any favourite packages/tutorials for forms that require multiple steps.
So far i found this package:https://laravel-arcanist.com/getting-started/
Documentation seems straight forward and it looks rather intuitive, my form has four steps (5-7 questions per step) - this package creates all the routes for you which seems rather nice!
Which are both great but seem to be a bit more manually involved - is the package overkill for this and just manually creating the routes a better idea?
The author of that package will completely rewrite the library, so I'd suggest not to use it for a production app.
You can create the form yourself with a little bit of creativity. If you need to ensure a particular order, you can make use of the concept of state machines and guarded transitions.
Depending on the need to store each step in the process the way would differ.
If there is no need to store each step separately then I would build one page with the entire form and then display the different parts of it depending on which step you are at.
Otherwise I would probably do something similar to the last two tutorials.
@Tray2 So i like this as well, just currently the form is on a single page with "steps" where the next step is hidden (not a new page, just hidden on same page), so im assuming each step would have an endpoint for validation, so i would make an AJAX call to veryify step 1, if its all good, hide form-part-1 and display form-part-2 with javascript, or is that overkill and should i just do the verificatoin after the last step? Just not sure how to do proper validation at the last step if there is an error on say form part 2 and part 3, might get confusing for the user.
@TuffRivers If I would do a multistep form that doesn't store the progress of each of the "pages", I would only have one endpoint and one form. So when the last "page" is displayed so would the submit button be.
If you want you could store the responses to each form element in the local browser storage.