We help IT Professionals succeed at work.
Get Started

HTML Form variables carried from page to page

robthomas09
robthomas09 asked
on
279 Views
Last Modified: 2013-12-12
Hello experts,

I have a 1-page form that I need to turn into 4 pages.  Essentially, it is a very large application form that I have all on one page, and need to break it down into several manageable-sized pages with a "Next" button at the bottom of each page.  

On the final page, ALL form fields from the previous pages need to be collected and submitted:

So, for example on page 1 we have:

City: <input type="text" name="city">
State: <input type="text" name="state">
Zipcode: <input type="text" name="Zipcode">
"Next"

and on page 2 we have:

Country: <input type="text" name="Country">
Phone: <input type="text" name="phone">
"Next"

and on page 3 we have:

ShiptoState: <input type="text" name="shiptostate">
shiptozipcode: <input type="text" name="shiptozipcode">
"Submit"

... when you click the submit button on the third page, how do I get the variables from pages one and two to be submitted with the third?  

I thought of creating hidden form fields on the third page, but wasnt sure how to get the value to be the field from the previous pages.

Thoughts?

Thanks in advance!
Comment
Watch Question
This problem has been solved!
Unlock 2 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE