macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: IF CHECK BOX IS CHECKED

Subject: Re: IF CHECK BOX IS CHECKED
From: "CF_output" <webforumsuser@xxxxxxxxxxxxxx>
Date: Wed, 30 Jul 2008 17:46:09 +0000 (UTC)
Newsgroups: macromedia.coldfusion.cfml_general_discussion

If you're going to make a field be required based on a client side event 
(checking a check box), then you have to use javascript.

 Since the stolen date field may be omitted if the checkbox is left empty, you 
wont want the date field to be required.

 Once the user attempts to submit the form, you will need a function to run to 
validate if the date field has been entered corresponding to the field with the 
checkbox.  If the date field has not been filled out, then dont submit the form 
and throw an alert.. If a value exists for the date field while the checkbox is 
checked, then submit the form.

 If you're unfamiliar with js, then you will have to run all of your validation 
on the server side, and notify the user of the errors after they have submitted 
the form.


<Prev in Thread] Current Thread [Next in Thread>