Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chriss39's avatar

Best Process for multistep form

I am writing an app that has a 4 step process to it. First step asks some basic information about the user. Step 2 asked for an address history for the last 7 years. Step 3 asks for employment history for last 7 years. Lastly I want them to verify all of the information that have entered before they submit it. When the data is submitted it will create a record in one table and then use the id of that record to store the address and employment addresses in their respective tables.

I am planning on doing it one of 2 ways but maybe there is a better way I have not thought of yet.

Option 1 Have all steps on the same page and just show and hide each section with jquery as they click continue. This way everything is apart of 1 form and then I can process once form is submitted after step 4. Once they click continue for each section I would copy the data they entered into step 4 window so they will see it to verify it at the end.

Option 2 Have them complete step 1 and create a record in the first table with a special status letting me know they have not completely everything. Then in step 2 and 3 just add the data as they complete it. Finally for step 4 call it all from the database and once they verify it change the status to complete. I think this will be a little more work as I will have to do some extra calls to pull in and show data and also add some logic to fill the information back into the form if they want to edit it before the confirm it.

Just looking for some feedback on what others would go with or if there is a better option than what I am thinking.

Thanks

0 likes
2 replies
bobbybouwmann's avatar

I would go for option 2. Let's say the user decides to close the browser and continue the form later on. When they would go back to the site, the site would tell them they already registered. You can then find the step they last did on the user and send them there.

JoerJoers's avatar

+1 on this. Same doubts with mine.

Other opinion from other devs would be great :)

Please or to participate in this conversation.