Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to use loop index as part of input parameter name

Status
Not open for further replies.

LongHorn

Programmer
Jun 20, 2001
30
US
I would like to use the loop index as part of the input nameI'm using fusebox methodology, so I'm passing the parameters to another form that will process these values.
But I can't get the value out of the passed parameters.

Here is part of my code:
<CFFORM ACTION=&quot;#PTH_PROJECT#index.cfm&quot; METHOD=&quot;post&quot;>
<CFSET nLpIndx = 0>
<CFLOOP QUERY=&quot;TEMembers&quot;>
<CFSET nLpIndx = nLpIndx + 1>
<CFINPUT TYPE=&quot;TEXT&quot;
NAME=&quot;start_date#nLpIndx#&quot;
VALUE=&quot;#DateFormat(Trim(TEMembers.start_date),&quot;mm/dd/yyyy&quot;)#&quot; SIZE=15 MAXLENGTH=15
VALIDATE=&quot;date&quot;>
</CFLOOP>
<INPUT TYPE=&quot;submit&quot; NAME=&quot;cmdSubmit&quot; VALUE=&quot;Submit&quot; WIDTH=&quot;100&quot;>
</CFFORM>

I used #attributes.start_date##nLpIndx#, ##attributes.start_date###nlpIndx#,... .
Please help.
Thanks,
Longhorn

 
Hey Longhorn,

To access dynamic variables, you need to use the evaulate function like this:

#evaluate(&quot;attributes.start_date#nLpIndx#&quot;)#

Let me know if you have any trouble with it,
GJ
 
GunJack,
You are so good. Evaluate function works perfectly. Thank you very much.

LH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top