|
|
On Jul 29, 6:09 pm, "theBeachBum" <webforumsu...@xxxxxxxxxxxxxx>
wrote:
> Hi All,
>
> Need help w/ a form technique.
>
> If I have X number of check boxes that are created dynamically, from 1 to X.
>
> On submit, I want to check if the box is checked, and if it is checked
> perform
> an action. I wrote the below but it's not working, need some help.
>
> <cfloop index="i" from="1" to="#query.recordcount#">
>
> <cfif #FORM.i# NEQ "">
> <cfquery datasource="#application.dsn#" name="action">
> XXX
> </cfquery>
> </cfif>
>
> </cfloop>
1. Lookup valid form field names [hint: should start with the LETTER,
NOT NUMBER]
2. Use struct/array notation when accessing dynamic names
struct[fieldName] (in your case form["cb#i#"])
|
|