Hello Derek,
You can do something like this:
<CFIF ParameterExists(Form.FieldNames)>
<CFSET Caller.Parameters = StructNew()>
<CFLOOP INDEX="FormKey" LIST="#Form.FieldNames#">
<CFTRY>
<CFSET FormVal = Evaluate("Form.#FormKey#")>
<CFSET StructInsert(Caller.Parameters, FormKey, FormVal, True)>
<CFCATCH>
</CFCATCH>
</CFTRY>
</CFLOOP>
</CFIF>
William J. Riley
Administrator
Atlantic Computer Systems & Services
Edge Web Hosting
Phone:(410) 363-4626
Fax:(410) 363-8526
[EMAIL PROTECTED]
http://www.edgewebhosting.net
-----Original Message-----
From: Derek Hamilton [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 7:20 PM
To: CF-Server
Subject: Dynamic Form Variable Names
Hello!
I'm hoping for some insight on displaying a dynamic number of form radio
buttons. Since I don't know how many I have to have a dynamic way of naming
them. That's not a problem, I just append a number to the end of the
regular name: name="action#index#".
The problem comes when I want to reference these names on the submission
page. If I try something like <cfif #action... It will just come back that
it is an invalid variable name.
I'm wondering how other people have solved a similar problem? Any
suggestions would be appreciated!
Thanks
Derek Hamilton
Systems Developer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com