you learn something everyday.

thanks for the insight

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 3:17 PM
To: CF-Talk
Subject: RE: Dynamic form fields


First off, I don't know if CF willbe happy with form fields named with
that syntax. I know PHP uses that syntax, but I can't promise it will
work in CF... but... try it. :)

Secondly, please, please, please do _not_ use Evaluate to get dynamic
form fields. Remember that form fields are stored in a structure. You
can rewrite

#evaluate('form.name[#getids.id#]')#

as:

Form["name[#getids.ids#]"]

Not only will the code be quicker, it will also be much easier to read.

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: Steven Dworman [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 3:11 PM
> To: CF-Talk
> Subject: RE: Dynamic form fields
>
>
> try
>
> #evaluate('form.name[#getids.id#]')#
>
> -----Original Message-----
> From: Bruce, Rodney (Contractor) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 2:15 PM
> To: CF-Talk
> Subject: Dynamic form fields
>
>
> hello all
>
>       Hope you can help with a little problem.
>
> I have on a field that is named using an id.
>
> On the form I have:
> <CFQUERY name="getids">
>       get ids
> </CFQUERY>
>
> <CFOUTPUT query="getids">
>       <INPUT type="text" name="name[#getids.id#]" value="#getids.id#">
> </CFOUTPUT>
>
>
> On the action page I have:
> <CFQUERY name="getids">
>       get ids
> </CFQUERY>
>
>
> <CFOUTPUT>
>       #form.name[getids.id]#
> </CFOUTPUT>
>
> I get "error resolving parameter form.name.
> I can see all my form fields listed in the debugging info at
> bottom of page.
> i.e.
> name[1] = 1
> name[2] = 2
>
> What am I missing?
>
> Thanks all
> Rodney
>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to