I am trying to insert the information from a form into a database, but I do not want the Hidden formfield values passed to the db. This script will be used for multiple forms, so I have to Loop through the formfields ignoring the Hidden formfields?? This is what I have so far.
<cfif isdefined("Form.Submit"
>
<cfset Field_List = "">
<cfloop index="Field_Name" list="#Form.Fieldnames#">
<cfset Field_List = listappend(Field_List,Field_Name)>
</cfloop>
<CFUPDATE DATASOURCE="EKG"
TABLENAME="#Form.TableName#"
FORMFIELDS="#Field_List#">
</cfif>
Thanks
<cfif isdefined("Form.Submit"
<cfset Field_List = "">
<cfloop index="Field_Name" list="#Form.Fieldnames#">
<cfset Field_List = listappend(Field_List,Field_Name)>
</cfloop>
<CFUPDATE DATASOURCE="EKG"
TABLENAME="#Form.TableName#"
FORMFIELDS="#Field_List#">
</cfif>
Thanks