There's not really much difference between the two types. They should, by
all rights, be done the same way ('cept one will have type="radio" on it)

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 

 


-----Original Message-----
From: j s [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 28, 2006 10:12 AM
To: CF-Talk
Subject: Re: Renaming dynamic form fields

This works great with checkboxes but I can't get it to work with radio
buttons and checkboxes.

>This is the way I usually handle this kind of task.  Look ma, no
evaluate().
>
>FORM
><form>
>  <input type=checkbox name="cb_1"...>
>  <input type=checkbox name="cb_2"...>
>  <input type=checkbox name="cb_77"...>
>  <input type=checkbox name="cb_999"...>
>...
></form>
>
>
>ACTION LOGIC
><cfloop collection="#form#" item="elem">
>  <cfif left(elem,2) EQ "cb">
>  <!--- This is a checkbox element, do something with it. --->
>  
>  <cfset checkBoxNum = listLast(elem,"_")> <!--- CB number. --->
>  
>  ...
>
>  </cfif>
></cfloop>
>
>This method has no cares about the actual numbers or their order.
>
>--------------
>Ian Skinner
>Web Programmer
>BloodSource
>www.BloodSource.org
>Sacramento, CA
>
>---------
>| 1 |   |
>---------  Binary Soduko
>|   |   |
>---------
> 
>"C code. C code run. Run code run. Please!"
>- Cynthia Dunning
>
>Confidentiality Notice:  This message including any
>attachments is for the sole use of the intended
>recipient(s) and may contain confidential and privileged
>information. Any unauthorized review, use, disclosure or
>distribution is prohibited. If you are not the
>intended recipient, please contact the sender and
>delete any copies of this message.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233657
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to