Tabbed Forms.

Permabanned
Joined
25 Oct 2004
Posts
9,078
Recreating a form used on our website that spans 4 seperate forms, I've got the layout sorted along with the tabs and validation, but am unsure on how i would go about submitting all 4 forms in one go.

Each of the tabs (apart from the 4th) have a button to continue to the next step. The final page will have the submit button and be used to submit all 4 tabs.

Anyone used a similar system before and have any recommendations on how I can go about doing this ?

Basic idea is, 4 Spry tabs, 4 seperate forms, forms 1 - 3 do not submit but do validate themselfs, form 4 submits form 1 - 4.
 
You could have each form submitting but not sending data, just store it in a session. Each subsequent form then adds more data to this and the final one redirects the user to a page that does all the data manipulation/entry.

That way each tab can be validated after the user has clicked next, or use jQuery to validate them and change the form that is being shown whilst staying on the same page.
 
How would i go about doing that as im not that familiar with sessions and how they work.

Would i just have each of the "continue" buttons store the validated data in a session (how?) then obviously have the final submit button pull all that data and send it to a "processor.php" file for example ?

I understand that storing a session variable is done with $_SESSION['variablename'] = $bobsyouruncle; but not sure how this data would be pulled from the forms without the form being submitted etc
 
Back
Top Bottom