This content has been marked as final. Show 4 replies
URL variables are a possibility, but IMO kind of ugly.
Are session variables available to you? if so, i'd handle it like this:
1) on the form page, do a <cfparam> for each form field, setting the value to empty string and putting the vars into the session scope. e.g. <cfparam name="#session.formFirstName#" value="" type="string" />
2) on the form page, give each input a value that corresponds to the value you created using the cfparam. e.g. <input type="text" name="firstName" value="#session.formFirstName#" />
3) on the action page, set each of the form values passed to a corresponding session variable. e.g. <cfset session.formFirstName = form.firstName />
don't do the validation/redirect back to the form until after all of the fields have been added to their corresponding session variables.
Do the form validation on page 1 (use <cfif> <cfifelse> <cfelse> method to display error messages). If the validation is successful, then on to page 2, with your URL variables in tact.
I have never validated forms with <cfif> <cfifelse> <cfelse> method
"Do the form validation on page 1 (use <cfif> <cfifelse> <cfelse> method to display error messages). If the validation is successful, then on to page"
How do i do this?
try clearing temporary internet files on the browser. this normally solves the problem of losing form data when you click the back button.