Require question with checkboxes to be answered
Hi.
I have some questions on a form and I want to require that they all be answered with something. I have some Cold Fusion code that puts a requirement on some of the questions, so if they don't answer it and they click submit, a pop up will display telling them they have to answer question 3 for example. Here's waht I have on one of the questions that has radio buttons:
<cfinput type="radio" name="Current_Project" value="yes" required="yes" message="Please answer question 2.">Yes
<cfinput type="radio" name="Current_Project" value="no">No
How can I do this on a question that has checkboxes since multiple ones can be checked? Each checkbox is a different name also. That's the problem. If they were all the same, it would be easy to code this. But they each need to be a seperate name because that's how I have them in the database. If I put the require code on each checkbox, the form will not go through until all the checkboxes are checked. I don't want that becasue the user needs to be able to choose their choices for that question and maybe only have 1 or 2 answers. Can I do this with Cold Fusion, or do I need to do javascript with these? Does anyone know how to do this? Thank you.
Andy
