one important thing to keep in mind is that checkboxes/radios/selects only 
get posted when they are checked/selected.  therefore always cfparam them 
before you check 'em if you're looping through dynamically generated values.


At 05:38 PM 1/5/2001 -0800, you wrote:
>Hey Steve
>
>You can include a hidden variable on your form page that contains
>the upper bound...
><input type="hidden" name="maxcount" value="#shipping.recordcount#">
>
>On the post page, you can then revisit each of your variables with
>something like:
>
><cfloop index="count" from="1" to="form.maxcount">
><cfoutput>
>do something with the variable's value with code similar to
>#evaluate("form.standard"&"#count#")#
></cfoutput>
></cfloop>
>
>Anyway, that should give you the idea...
>
>Greetings,
>Brian
>
>-----Original Message-----
>From: Steve Herring [mailto:[EMAIL PROTECTED]]
>Sent: Friday, January 05, 2001 5:30 PM
>To: CF-Server
>Subject: Dynamic Form Variable Names?
>
>
>Hey everyone!
>
>I have what I hope is a simple question that I'm just missing the answer to:
>
>I have a page which contains a form with several <INPUT> tags which I need
>to dynamically generate.  The code for this page is something like:
>
><FORM ...>
><CFLOOP INDEX="StepNum" FROM="1" TO="#shipping.RecordCount#" STEP="1">
>         <CFIF shipping.method[StepNum] EQ "Ground">
>                 <TD><INPUT NAME="standard#StepNum#"
>VALUE="#shipping.price[StepNum]#"
>SIZE="5"></TD>
>         </CFIF>
></CFLOOP>
><.../FORM>
>
>So my question is... on the posting/result page, how can I reference the
>form variables that were created such as form.standard1, form.standard2,
>form.standard3, etc by using some kind of loop variable on that side?  Such
>as #form.standard, StepNum#?
>
>Many thanks to any help!
>
>-Steve Herring
>  Exact Interactive
>  Portland, OR
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to