This should work...

<cfloop index="i" from="1" to="3">
      <cfset formField = "form.field" & "#i#">
        <cfif #formfield# is not "">
        <cfoutput> #evaluate(formField)# </cfoutput>
    </cfif>
</cfloop>

>From: "Frederic COLLIN" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Variable creation
>Date: Fri, 12 May 2000 15:29:06 +0200
>
>Hi,
>
>I'd like to evaluate in a CFLOOP 3 fields named
>field1 field2 field3 from a cfform.
>I'd like to create dynamically the name of a variable.
>
>What's wrong with the following code :
>
><cfloop index="i" from="1" to="3">
>     <cfif #form.field#i# is not "">
>         <cfoutput> OK <cfoutput>
>     </cfif>
></cfloop>
>
>
>THANKS
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to