Nested pound sign problem

Posted by Ray Buechler on Stack Overflow See other posts from Stack Overflow or by Ray Buechler
Published on 2010-06-17T19:30:11Z Indexed on 2010/06/17 19:33 UTC
Read the original article Hit count: 186

Filed under:

I'm having an issue when I try to nest pound signs in my ColdFusion code. I keep getting the following error message:

Invalid CFML construct found on line 57 at column 26. ColdFusion was looking at the following text:

#

Here is the code:

<cfloop index="i" from="1" to="12">
    <cfset needRecord.setNeed#i#(#form["need#i#"]#) />
</cfloop>

If I run the loop outside the cfset tag like this:

<cfloop index="i" from="1" to="12">
    needRecord.setNeed#i#(#form["need#i#"]#)
</cfloop>

The code runs and generates what I would like to generate within the cfset tag. Any idea what I'm doing wrong?

Any help would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about coldfusion