Hi Dave.

The form works now. It will remember the visitors entry.

But if left unchecked, I'm getting an error message when email is sent ot the 
captcha is correct.

<cfparam name="url.all" default="">

<cfinput type="checkbox" name="all" checked="#isDefined('form.all')#"> All 50 
States

Regards,

Barry


>Barry,
>
>Try it the way Adrian suggested - much cleaner - and only one line of code:
>
><cfinput type="checkbox" name="all" checked="#isDefined('form.all')#">
>
>Also, check this - do you have a <cfparam name="form.all" default=""> line
>at the top of your code?  If so, that changes how you need to code the
>cfinput line.
>
>Dave
>
>Hi Dave.
>
>I added your code but it still does not save the visitors checkbox (All 50
>States)
>
><cfif isDefined("form.all")>
><cfinput type="checkbox" name="all" checked="yes">All 50 States
><cfelse>
><cfinput type="checkbox" name="all">All 50 States
></cfif> 
>
>Here is the link. Try typing the wrong captcha text and uncheck "All 50
>States".
>
>http://www.firefightingnews.com/contact_us_directory.cfm
>
>Thanks,
>
>Barry
>
>checked.
>>So, we check to see if it is defined and if it is, then we know the box was
>>previously checked, and so we execute the cod that will display it as
>>checked.  If the form.checkall variable is NOT defined, then the checkbox
>>wasn't checked (or the form scope doesn't even exist, like on the first
>time
>>load of the page) and so we don't display it checked.
>>
>>Hope this helps.
>>
>>Dave Phillips 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:4629
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