if you're using CF5or above then you should be using form["form.menuid_" &
menuid] rather than evaluate, for performance reasons.

> -----Original Message-----
> From: Dave Phipps [mailto:[EMAIL PROTECTED]
> Sent: 25 February 2003 11:30
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] Form loop help?
> 
> 
> Thanks Paul.
> 
> Here is the final code that produces the desired results:
> 
> <cfloop list="#form.fieldnames#" index="i">
>          <cfif ListFirst(i, "_") EQ "menuid">
>           <cfset menuid = listlast(i, "_")>
> 
>          <cfoutput>Menuid: #menuid#, #Evaluate("form.menuid_" & 
> menuid)#<br></cfoutput>
>         </cfif>
> </cfloop>
> 
> Is there any way of avoiding the use of Evaluate in a situation like 
> this?  I know it does not do well for performance but is 
> there another way?
> 
> Thanks for all the help.
> 
> Dave
> 
> At 11:12 2/25/2003 +0000, you wrote:
> >Dave,
> >
> > > I have a form that I can't seem to work out how to handle.
> > >
> > > I have some text fields which are defined as follows:
> > >
> > > <input type="text" name="menuid|#menuid#" value="#displayorder#">
> >
> >This isn't good code.  Change the | for an underscore:
> >
> ><input type="text" name="menuid_#menuid#" value="#displayorder#">
> >
> > > What I can't seem to work out is how to loop through these
> > > fields so that
> > > the value of #displayorder# is inserted against the #menuid#.
> >
> >And then you can do:
> >
> ><cfloop list="#form.fieldnames#" index="i">
> >         <cfset displayorder = listlast(i, "_")>
> ></cfloop>
> >
> >Not a huge change
> >
> >Paul
> >
> >
> >
> >--
> >** Archive: 
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>For human help, e-mail: [EMAIL PROTECTED]


============================================
Phipps CF Development
Oxford, Oxfordshire.
Telephone: +44(0)7718 896696
http://www.phipps-cf.co.uk
============================================


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to