> #form.fieldnames# woudl return
>
> section1,section2,section3,section4
>
> I need the values of
>
> #form.section1#
> #form.section2#
> #form.section3#
>
> I need to turn them into variables and get their values
>
> any other suggestions??
Charlie's original suggestion was that you loop over the variable
Form.Fieldnames:
<cfloop list="#Form.fieldnames#" index="i">
<cfoutput>#Form[i]#</cfoutput><br>
</cfloop>
Or, you could use the Form structure to do essentially the same thing:
<cfloop collection="#Form#" item="i">
<cfoutput>#Form[i]#</cfoutput><br>
</cfloop>
I'd recommend the second approach if you're using a server which supports it
(CF 4+), since the behavior of Form.fieldnames has changed between CF 5 and
CF MX (duplicate field names are no longer displayed), but either will do
for most uses.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists