I made a mistake and forgot the scope. Also you should probably have
something to break it up so you can read it, like this:
<CFLOOP list="#form.fieldnames#" index="formField">
#formField# = #evaluate('form' &formField)# <br />
<CFLOOP>
Also someone mentioned that the cfoutput wouldn't matter, well the loop does
need to be contained inside of an output for the server to process that
section of the template and write the variables.
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
> -----Original Message-----
> From: Timothy Heald [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 09, 2002 4:28 PM
> To: CF-Talk
> Subject: RE: Form.FIELDNAME - error!!!!
>
>
> Not sure if this is an error or just a bad practice, but you
> don't need the
> # signs in your variable declaration (cfset)
>
> <CFSET var = ListGetAt(Form.FIELDNAMES, i)>
>
> works just fine. Also you don't need to generate that var at all you can
> just do a list loop like this:
>
> <CFLOOP list="#form.fieldnames#" index="formField">
> #formField# = #evaluate(formField)#
> <CFLOOP>
>
> Tim Heald
> ACP/CCFD :)
> Application Development
> www.schoollink.net
>
> > -----Original Message-----
> > From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 09, 2002 4:16 PM
> > To: CF-Talk
> > Subject: Form.FIELDNAME - error!!!!
> >
> >
> > Hi,
> >
> > Can any one tell me what is the mistake in
> >
> > <CFLOOP FROM="1" TO="#ListLen(FORM.FIELDNAMES)#" STEP="1" INDEX="i">
> > <CFSET var = #ListGetAt(Form.FIELDNAMES, i)#>
> > #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
> > <BR>
> > </CFLOOP>
> >
> >
> > I am getting the following error:
> >
> > An error occurred while evaluating the expression:
> > "#ListLen(FORM.FIELDNAMES)#"
> >
> >
> > Any help on this is appreciated.
> >
> > thanks,
> > Sudheer Chakka.
> >
> >
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists