1
votes

I have following code:

<cfloop from="1" to="3" index="i">
    <cfloop list="#FORM.cboStructureLevel_#i##" index="ii" delimiters=",">
        #ii#
    </cfloop>
</cfloop>

The problem is that I want to output the list but I am getting the error "Element CBOSTRUCTURELEVEL_ is undefined in FORM.". It does not recognize the output of #i# in the list in the second cfloop.

How can I output the whole list as declared above?

Thank you for your help.

2

2 Answers

6
votes

Try this for your inner loop:

<cfloop list="#form['cboStructureLevel_' & i]#" index="ii">
0
votes

try to use evaluate function:

#Evaluate('FORM.cboStructureLevel_#i#')#