title: Validating Checkboxes with Coldfusion
body: <p>I have checkboxes on a webpage that need to be validated using coldfusion, how might I validate at least one checkbox for each group needs to be answered?</p>
  
  <pre><code>&lt;div name="multanswerheader" id="multanswerheader" style="width:100%;"&gt;
              &lt;div name="multanswerques" id="multanswerques"&gt;
                  &lt;label class="multanswerques"&gt;Ques 1:&lt;/label&gt;
                  &lt;label class="multanswerques"&gt;Ques 2:&lt;/label&gt;
                  &lt;label class="multanswerques"&gt;Ques 3:&lt;/label&gt;
                  &lt;label class="multanswerques"&gt;Ques 4:&lt;/label&gt;
                  &lt;label class="multanswerques"&gt;Ques 5:&lt;/label&gt;
              &lt;/div&gt;
              &lt;div name="multanswera" id="multanswera"&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio1" value="1" &lt;cfif ListFind(form.multradio1,"1") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;A&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio2" value="1" &lt;cfif ListFind(form.multradio2,"1") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;A&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio3" value="1" &lt;cfif ListFind(form.multradio3,"1") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;A&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio4" value="1" &lt;cfif ListFind(form.multradio4,"1") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;A&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio5" value="1" &lt;cfif ListFind(form.multradio5,"1") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;A&lt;/input&gt;&lt;/div&gt;
              &lt;/div&gt;
              &lt;div name="multanswerb" id="multanswerb"&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio1" value="2" &lt;cfif ListFind(form.multradio1,"2") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;B&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio2" value="2" &lt;cfif ListFind(form.multradio2,"2") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;B&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio3" value="2" &lt;cfif ListFind(form.multradio3,"2") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;B&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio4" value="2" &lt;cfif ListFind(form.multradio4,"2") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;B&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio5" value="2" &lt;cfif ListFind(form.multradio5,"2") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;B&lt;/input&gt;&lt;/div&gt;
              &lt;/div&gt;
              &lt;div name="multanswerc" id="multanswerc"&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio1" value="3" &lt;cfif ListFind(form.multradio1,"3") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;C&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio2" value="3" &lt;cfif ListFind(form.multradio2,"3") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;C&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio3" value="3" &lt;cfif ListFind(form.multradio3,"3") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;C&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio4" value="3" &lt;cfif ListFind(form.multradio4,"3") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;C&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio5" value="3" &lt;cfif ListFind(form.multradio5,"3") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;C&lt;/input&gt;&lt;/div&gt;
              &lt;/div&gt;
              &lt;div name="multanswerd" id="multanswerd"&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio1" value="4" &lt;cfif ListFind(form.multradio1,"4") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;D&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio2" value="4" &lt;cfif ListFind(form.multradio2,"4") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;D&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio3" value="4" &lt;cfif ListFind(form.multradio3,"4") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;D&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio4" value="4" &lt;cfif ListFind(form.multradio4,"4") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;D&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio5" value="4" &lt;cfif ListFind(form.multradio5,"4") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;D&lt;/input&gt;&lt;/div&gt;
              &lt;/div&gt;
              &lt;div name="multanswere" id="multanswere"&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio1" value="5" &lt;cfif ListFind(form.multradio1,"5") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;E&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio2" value="5" &lt;cfif ListFind(form.multradio2,"5") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;E&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio3" value="5" &lt;cfif ListFind(form.multradio3,"5") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;E&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio4" value="5" &lt;cfif ListFind(form.multradio4,"5") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;E&lt;/input&gt;&lt;/div&gt;
                  &lt;div class="multanswerques"&gt;&lt;input type="checkbox" name="multradio5" value="5" &lt;cfif ListFind(form.multradio5,"5") GT 0&gt;checked="checked"&lt;/cfif&gt;&gt;E&lt;/input&gt;&lt;/div&gt;
              &lt;/div&gt;                
          &lt;/div&gt;
  </code></pre>