Here is what I do - and I have error handling and Captcha.

Top of form I make params for all form variables: (As I use these in
submittal and some validation)

<cfparam name="FORM.Phone" default="">
<cfparam name="FORM.testcheck" default="0">  **My Checkbox**
Etc...

Form Elements look like so:

<form action="<cfoutput>#CurrentPage#?#CGI.QUERY_STRING#</cfoutput>"
method="post">

<input name="Phone" type="text" id="Phone"
value="<cfoutput>#FORM.Phone#</cfoutput>">

<input name="testcheck" type="checkbox" value="1" <cfif
IsDefined("FORM.testcheck") AND #FORM.testcheck# EQ 1>checked</cfif>>

</form>

If your form submits okay (form validates) - make sure you test for the
"checkbox" variable - - 

<cfif IsDefined("FORM.testcheck") AND #FORM.testcheck# EQ 1>
        YES - It was checked
<cfelse>
        NOPE
</cfif>

Probably some redundancy there - but better safe than sorry.  :)  I hope
that helps!

- Nick


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4634
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to