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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form validation

Status
Not open for further replies.

calista

Programmer
Jan 24, 2001
545
US
I have a question about form validation. I am using the following sample form:
Code:
<FORM ACTION=&quot;ValidateAction.cfm&quot; METHOD=&quot;post&quot;>
<INPUT TYPE=&quot;hidden&quot; NAME=&quot;FirstName_Required&quot; VALUE=&quot;Please enter a first name.&quot;>
<INPUT TYPE=&quot;hidden&quot; NAME=&quot;LastName_Required&quot; VALUE=&quot;Please enter a last name.&quot;>
<INPUT TYPE=&quot;hidden&quot; NAME=&quot;Password_Required&quot; VALUE=&quot;A password is required.&quot;>
First Name<BR>
<INPUT TYPE=&quot;Text&quot; NAME=&quot;FirstName&quot; SIZE=&quot;30&quot; MAXLENGTH=&quot;30&quot;><BR>
Last Name<BR>
<INPUT TYPE=&quot;Text&quot; NAME=&quot;LastName&quot; SIZE=&quot;30&quot; MAXLENGTH=&quot;30&quot;><BR>
Password<BR>
<INPUT TYPE=&quot;Password&quot; NAME=&quot;Password&quot; SIZE=&quot;20&quot; MAXLENGTH=&quot;20&quot;><BR>
<BR>
<INPUT TYPE=&quot;Submit&quot; NAME=&quot;Submit&quot; VALUE=&quot;Submit&quot;>
</FORM>
If any of the fields are blank, it returns a page with my error message(s) telling you to hit the &quot;Back&quot; button and correct the listed error(s). This is all well and good, except that when you hit the &quot;Back&quot; button, you lose ALL the data that was entered. How do I keep the good data when this form is submitted? This is a very simple example, but I have a much more complex form in which losing the good data is much more than just a nusciance. Any help greatly appreciated. Thanks! Calista :-X
Jedi Knight,
Champion of the Force
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top