> How would you check if a checkbox was indeed checked within a <cfif> block?

checkboxes are not included in the form collection if they are not
checked. So you could use isdefined() like so:
<cfif isdefined("checkboxname")>

I often cfparam my checkbox form elements so that I can reference them easily:
<cfparam name="form.checkboxname" default="" />

Then, if I need to check the value, use:
<cfif form.checkboxname neq "">

Cheers,
Kris

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263021
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to