The Idea of using hidden form fields can be made a lot easier by using a custom tag.. I took the initial idea from Ben Forta and made it a lot easier to understand.<br>
<br>
Create a page called embedfields.cfm in your c:\cfusion\custom tags directory. The page should consist of the code below:<br>
<br>
<cfsetting enablecfoutputonly="Yes"><br>
<CFIF IsDefined("FORM.fieldnames"

><br>
<cfloop index="Var" list="#fieldnames#"><br>
<cfoutput><br>
<input type="Hidden" name="#var#" value="#evaluate('form.' & var)#"><br>
</cfoutput><br>
</cfloop><br>
</CFIF><br>
<cfsetting enablecfoutputonly="no"><br>
<br>
Nothing else... no <html> or <body> tags just the code above.<br>
<br>
Next you need to run it from your code and always within form tags. eg. <br>
<form method="post" action="page3.cfm><br>
<cf_embedfields><br>
</form><br>
<br>
What the tag does is take the form fields posted from the previous page and dumps them to Hidden<br>
Form fields. So the tag isn't needed on the first page only on the pages with forms that follow.<br>
<br>
Your <cfinsert> should only then need to define the table and datasource to put all the data in thats all.<br>
<br>
If you need to skip some form fields before they go into <cfinsert> then use the code below just before your <cfinsert> tag:<br>
<br>
<cfset mylist=""><br>
<cfloop list="#fieldnames#" index="var"><br>
<!--- define fields to skip here ---><br>
<cfif (#var# is "timestamp"

or (#var# is "recordid"

or (#var# is "action"

or (#var# is "override"

><br>
<cfelse><br>
<!--- Include all other fields into variable mylist ---><br>
<cfset mylist=#ListAppend(mylist, var)#> <br>
</cfif><br>
</cfloop><br>
<br>
Your <cfinsert> should then be <CFINSERT datasource="yourds" TABLENAME="yourtable" FIELDS="#mylist#"><br>
<br>
Problem solved.....<br>
<br>
Arachind....