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

Need a "Preview" of form data before submit

Status
Not open for further replies.

MorganGreylock

Programmer
Joined
Jan 30, 2001
Messages
223
Location
US
After the user enters data on a form, I want them to then go to a page which lets them see what they've just entered, then gives them the option of 1) clicking the back button to make changes, or 2) clicking another button to actually submit the data. Heres my question:

When they click on the submit button to save the changes, is there a nice/clean/easy way to propagate all those fields (were talking in the 50's or so of number of fields) to go to the next (ie third) page without using a bunch of hidden input forms to resend the data out?

I was thinking that using session variables might work, but I don't have the time to change the current code to handle them, besides the fact that I don't know that much about session stuff yet...

Does anyone have any suggestions?

Thanks in advance
MG
 
It would be easier/better to set a bunch of hidden fields -- a quick way would be to use the FormFields structure to loop through the fields and set it on the second page.

e.g
<cfloop list=&quot;#form.fieldnames#&quot; index=&quot;idx&quot;>
<cfoutput>
<input type=&quot;hidden&quot; name=&quot;#idx#&quot; value=&quot;#Evaluate(&quot;form.#idx#&quot;)#>
</cfoutput>
</cfloop>

this will set a hidden variable with the name of the original formfield and with the value.

HTH,
Tim P.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top