Page 1 of 1
MultiPage Form in 1 page
Posted: Tue Sep 02, 2014 5:06 pm
by donny
hello,
can anybody tell me how i can do multiple forms/form processing on 1 page. i look on some sites and their code has like 3/4 different forms in it but they all show up on the same page separately. like one after another. when you finish the first form it goes to the second and so on. is this done with php?
Re: MultiPage Form in 1 page
Posted: Wed Sep 03, 2014 4:58 pm
by phphelpme
Hi there.
You might want to check out this idea:
http://thecodeplayer.com/walkthrough/jq ... ogress-bar
This uses jquery to split the form up into what appear different forms but in reality, it just displays the one form in three different sections and all data is submitted together.
Hope this helps.
Best wishes
Re: MultiPage Form in 1 page
Posted: Wed Sep 03, 2014 7:00 pm
by donny
this is actually very cool. much nicer than what i was looking for. however the form i am making is a big order form so after one page of them typing out info i want it to show up on another page .. for example when they type in shipping info i need it to show up on a later page. if this is one big form i don't know how to show submitted information without processing it through a database?
Re: MultiPage Form in 1 page
Posted: Thu Sep 04, 2014 1:11 am
by phphelpme
Hi there.
I personally would suggest either using PHP Sessions:
http://www.w3schools.com/php/php_sessions.asp
Or using some form of cookie:
http://www.w3schools.com/php/php_cookies.asp
Both of these options will allow you to create a form with a select amount of data, submit that to a PHP handling file, store the values in a session or cookie, transfer them to the second form using 'location' in PHP and then your form can use the previously entered details in the session or cookie to populate any form elements you need.
I hope this points you in the right direction.
Best wishes.