|
Mailing Lists
|
Home / Groups / ColdFusion Newbie (CF-Newbie)
cfloop listHi 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> > > |
May 25, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||