Loop over the form.fieldnames variable and check the start of the string
<cfloop list="#form.fieldnames#" index="i">
<cfif left(i,4) is 'name'>
<cfset myvalue = form[i]>
<cfbreak>
</cfif>
</cfloop>
Brook
-----Original Message-----
From: Richard Steele [mailto:[email protected]]
Sent: December-09-10 3:59 PM
To: cf-talk
Subject: Getting the value of a hidden form field with changing names
I have a form that has a hidden field whose value is set using a jquery
function. That hidden field's name is also set on the fly and has digits
appended to it (eg. name-01 or name-99). These numbers change each time the
form is loaded.
When the form is submitted through a post, how do I grab the value of that
hidden field if I only know the root of that name (as a result of digits
being appended to it each time)?
Hope this makes sense. Thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339953
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm