Simply do this with the first checkbox item in the group:

<cfinput type=checkbox name=mycheckbox required=yes message="you must click
at least one check box">

Then name all of your checkboxes "mycheckbox" (or the name of your choice).

If all of the check boxes are left blank, there will be a JavaScript
warning.  If any one of them is checked, no warning.

I use this all of the time.

It will only work if the FIRST item is marked as REQUIRED.  If it is any
other item, it doesn't work for some reason.

H.

=========================
Howard Owens
Web Producer
InsideVC.com
mailto:[EMAIL PROTECTED]
=========================

> -----Original Message-----
> From: AustralianAccommodation.com Pty. Ltd.
> [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, October 10, 2000 7:27 AM
> To:   CF-Talk
> Subject:      Making Check Box Selection Mandetory
> 
> Using forms placing "required" and "message" inside the input tag allows
> you
> to ensure that the user enters input in order for the form to be submitted
> 
> is it possible to have the same functionality over check box input when
> there are several check boxes to select from for the one input variable
> without any initially being checked and that unless the user checks one of
> the them the form will not be submitted
> 
> I look forward to your comments
> 
> 
> 
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to