[thelist] Trim all FORM.fieldnames in ColdFusion?

faust at ThinkChurch.com faust at ThinkChurch.com
Wed Apr 25 15:21:36 CDT 2001


Is there a way to just Trim all of the #FORM.fieldnames# in 
ColdFusion.  Something like:

<CFIF #ParameterExists(FORM.fieldnames)#>
 <CFSET #fieldnames_processed# = "">
 <CFLOOP INDEX="form_element" LIST="#FORM.fieldnames#">
	<CFIF #ListFind(#fieldnames_processed#, #form_element#)# IS 0>
	   <CFSET #form_element_qualified# = "FORM." & #form_element#>
	   <CFSET #form_element_qualified# = Trim(#form_element_qualified#)>
	   <CFSET #fieldnames_processed# = #ListAppend(#fieldnames_processed#, #form_element#)#>
   </CFIF>
 </CFLOOP>
</CFIF>

but that works.  :-)


TIA

Faust


"Miss Morris, I'm perfectly capable of fixing my own 
 breakfast.  As a matter of fact, I had a peanut butter 
 sandwich and two whiskey sours."
-- Richard Sherman, _The Seven-Year Itch_




More information about the thelist mailing list