View Full Version : Passing Form Values To Another Page
01-15-2003, 03:38 AM
I would like to offer a "mini-form" on my homepage that would allow people to signup for my newsletter. The form would ask for their email. When they press submit, I want them to be taken to an expanded version of the form where they fill out there name and a few other details.
My question is, if they fill out their email address on my homepage, how can I get the email address value to be auto-populate on the next page?
If I'm being unclear, let me know.
I really appreciate you help!
01-15-2003, 04:16 AM
Here is an example of hou you can send it through a URL. The first page with the form asking for the Email Address:
<title>Thank You Page Test</title>
alert("Please Enter email address.")
<body bgcolor="lightgreen" onLoad="document.myform.email_addr.focus();document.myform.reset()">
<FORM NAME="myform" onSubmit="return NewPage()">
Email Address:<INPUT TYPE="text" SIZE="30" MAXLENGTH="30" NAME="email_addr">
<INPUT TYPE="button" VALUE="Send It" onClick="NewPage(this.form)"> <INPUT TYPE="reset" VALUE="Clear Form" > </CENTER>
The second page which displays the email address in a text box:
<INPUT TYPE="text" NAME="email" SIZE="30">
Also here is a link to a tutorial that give an explanation of how it works:
Hope that helps and good luck.
01-15-2003, 05:21 AM
Thank you so much!
This board is such a great group of people. I have been an observer for sometime. Everyone always gets the help they need.
01-20-2003, 06:30 PM
It seems that u understand the code very well Requestcode
Now I have a question.
This script works grate, but can it be modified so the text that u send to another page will not apear in a textbox but in plain text so I can put it on my webpage. This way the script will serve as a "Next" button, on when clicked brings u to a page where u can verify your data and then let it be send to me.
01-20-2003, 06:55 PM
You want to display the data and if it is correct they can have it emailed to you or if it is not correct then send them back to the preveious page? Are you using a server side script to mail the data or the "mailto:" in the action field.
01-20-2003, 06:56 PM
yes, I found a script to let it be sent to me
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.