> Can you have dynamic variable names in CF?....e.g in an
> action page could you have something like -
>
> <cfset thelist = "">
> <cfloop from="1" to="3" index="id">
> <cfset thevalue = Evaluate(form.fieldnum & "#id#")>
> <cfset thelist = ListAppend(thelist, thevalue)>
> </cfloop>
Sure, but if you want to dynamically reference form.fieldnum1, you'd want
your Evaluate function to look like this:
<cfset thevalue = Evaluate("form.fieldnum" & id)>
What this'll do is concatenate the string "form.fieldnum" with the string
contained in the variable id, then evaluate that string.
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
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists