House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Newbie (CF-Newbie)

cfloop list

Author:
Rob Voyle
03/11/2012 03:55 AM

Hi Dave Thanks, after much frustration I was able to get it to work. Here is one crazy thing I found. When creating lists I prefer for ease of editing to create one entry per line eg: listitem1, listitem2, listitem3, rather than string out one line listitem1,listitem2,listitem3, what that creates in the loop is a hardspace before each item so when I create the error variable: <cfset "error#fieldName#" I get a coldfusion error message "error fieldname" is not a valid coldfusion variable name. I tried taking out the " " with Replace but to no avail. Thanks for your help rob > <cfloop list="#form.fieldnames#" index="fieldname"> >    <cfset "error#fieldName#" = "here is your error message, the > error value is: #evaluate('form.'&fieldname)#"> > </cfloop> > >


Search cf-newbie

May 25, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference