I have a question about form validation. I am using the following sample form:
If any of the fields are blank, it returns a page with my error message(s) telling you to hit the "Back" button and correct the listed error(s). This is all well and good, except that when you hit the "Back" 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
Code:
<FORM ACTION="ValidateAction.cfm" METHOD="post">
<INPUT TYPE="hidden" NAME="FirstName_Required" VALUE="Please enter a first name.">
<INPUT TYPE="hidden" NAME="LastName_Required" VALUE="Please enter a last name.">
<INPUT TYPE="hidden" NAME="Password_Required" VALUE="A password is required.">
First Name<BR>
<INPUT TYPE="Text" NAME="FirstName" SIZE="30" MAXLENGTH="30"><BR>
Last Name<BR>
<INPUT TYPE="Text" NAME="LastName" SIZE="30" MAXLENGTH="30"><BR>
Password<BR>
<INPUT TYPE="Password" NAME="Password" SIZE="20" MAXLENGTH="20"><BR>
<BR>
<INPUT TYPE="Submit" NAME="Submit" VALUE="Submit">
</FORM>
Jedi Knight,
Champion of the Force