I have a form field for “E-mail” address and I want to set up a small form at the top of each page that has a field for “E-mail Address” and then a Sign up button that takes you to a page to complete a detailed form for mailing list subscription. The two things I’m having problems with:
- How do I pass the data entered in the form to the E-mail address on the dedicated “Mailing List” page?
- How do I redirect to the user to the dedicated “Mailing List” page when they click “Submit”?
As you look ready to use javascript to pass data, why not go one step further and have a single page for your functionality.
And with javascript you show or hide the form you want the user to see.
Or even you build a single form and you show or hide some additional fields between the 2 states.
In these configurations, reading values in the same page is very easy.
And the user experience will be better.
Edit (after a desperate comment 😉
In the BODY of your page set a form like that:
And in the BODY of the signup page:
When you click the button of the first form, the url is built with a parameter to the signup page.
The signup page is loaded, and then we get the reference of the form, read the value of the url with the function “urlParam” and place the value to the field named “email”