Try this...

<cfset text2learn = form['textread' & i] />

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-----Original Message-----
From: Dakota Burns [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 11:46 PM
To: CF-Talk
Subject: Capturing Variable Correctly

I have a form that provides form elements (file uploads & one text box per
grouping) in a loop.  The names of my form elements (specifically the
problem one, which is the text box) are "variables.textread", and I've
concatenated an index value to each of the form fields.  When the form is
submitted, I'm attempting to capture the value of "form.textread1" (where 1
is the first indexed value), and am having a problem doing so.  My last
attempt is listed below, which results in an error stating "form.textread.1"
is not defined.  What's the best method for concatenating that index value?


INCLUDED CODE
    <cfloop index="i" from="1" to="3" step="1">
        <cfset text2learn = #form.textread[i]#>
        <cfoutput>#text2learn#</cfoutput>
    </cfloop>

Thanks,
Dakota




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 beta - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284489
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to