Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prepopulate a form field

Status
Not open for further replies.

rb1976

Programmer
Oct 11, 2001
5
US
I have a 2 page form. The first form asks, for the email address. On the second page, I want the email field to prepopulate what the user entered on the first page.
Here's what I have:
First page: <tr>
<td align=&quot;right&quot;><span class=&quot;required&quot;>*</span>Email address:</td>
<td &quot; align=&quot;left&quot;>
<cfif ParameterExists(session.screeneremail) AND cgi.http_referer CONTAINS &quot;register4.cfm&quot;>
<cfinput type=&quot;Text&quot; name=&quot;screeneremail&quot; message=&quot;Please enter an email address.&quot; required=&quot;Yes&quot; value=&quot;#session.screeneremail#&quot;>
<cfelse>
<cfinput type=&quot;Text&quot; name=&quot;screeneremail&quot; message=&quot;Please enter an email address.&quot; required=&quot;Yes&quot;>
</cfif>
</td>
</tr>

second page:
<cfinput type=&quot;Text&quot; name=&quot;screeneremail&quot; message=&quot;Please enter an email address.&quot; required=&quot;Yes&quot; value=&quot;#form.screeneremail#&quot;>


Hopefully you can tell me what I'm doing wrong here. I appreciate any help!!
 
You have <td &quot; align=&quot;left&quot;> in there. Kevin
slanek@ssd.fsi.com
 
First, ParameterExists() is getting phased out, try IsDefined() instead.

Is your form submit method GET or POST? If it's GET then you want URL.screeneremail instead of FORM.screeneremail. Are you getting any value at all? View the source of page 2 to see.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top