It you did a replace on " ", it wouldn't work - it's a carriage return, not space. Try removing that.
On Sat, Mar 10, 2012 at 12:14 PM, Rob Voyle <[email protected]> wrote: > > 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> >> >> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5814 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
