Answers.Body: <p>Using Jquery snippet below has solved my problem. First you will need to attach a javascript file to your Theme or Template so it will be loaded after JQuery, then hook into CRM.$ and away you go...</p>
  
  <pre><code>$( document ).ready(function() {
      CRM.$(function($) {
          $(".CRM_Profile_Form_Edit").on('submit', function (e) {
              if ($('input[id^="custom_XXX_"]:checked').length != $('input[id^="custom_XXX_"]').length) {
                  $('#editrow-custom_XXX').addClass('crm-error crm-error-label');
                  alert("Please ensure you tick all options.");
                  return false;
              }
          });
      });
  });
  </code></pre>
  
  <blockquote>
    <p>NOTE: Replace "<strong>XXX</strong>" above with the ID of your custom field in CiviCRM (You can find this out by using the "View Source" feature in your browser and looking at the HTML Input Element for the field in question).</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-22T14:12:18.837Z
Answers.LastActivityDate: 2016-08-22T14:12:18.837Z
Answers.UserDisplayName: Darren
Answers.Body: <p>I dont think their is some setting in CiviCRM to set all the check box to required in a single custom group </p>
  
  <p>But, you can create a javascript to set all the check box to Flag if one box is clicked </p>
  
  <p>or you can check the value of the check box before form submit and alert the user</p>
  
  <p>I guess this helps !!!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-17T14:09:36.173Z
Answers.LastActivityDate: 2016-08-17T14:09:36.173Z
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Body: <p>I have a single Custom Field of type "Alphanumeric" and "CheckBox" with a check list which requires all boxes to be ticked before continuing. </p>
  
  <p>I have set the field to Mandatory but this allows the form to be submitted with just one option selected.</p>
  
  <p>Is there a way to set a CheckBox widget to require all boxes to be ticked? I don't really want to create lots and lots of Custom Fields to achieve this.</p>
  
Tags: <custom-fields><profile>
Title: How do I ensure all Check Boxes are ticked for a single Custom Field on a Profile form?
ThreadText: # How do I ensure all Check Boxes are ticked for a single Custom Field on a Profile form?
  
  (Asked by: username_0 on 2016-08-17)
  
  I have a single Custom Field of type "Alphanumeric" and "CheckBox" with a check list which requires all boxes to be ticked before continuing.
  
  I have set the field to Mandatory but this allows the form to be submitted with just one option selected.
  
  Is there a way to set a CheckBox widget to require all boxes to be ticked? I don't really want to create lots and lots of Custom Fields to achieve this.
  
  **Tags:** custom-fields, profile
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2016-08-22. Score: 0 | Accepted answer
  
  Using Jquery snippet below has solved my problem. First you will need to attach a javascript file to your Theme or Template so it will be loaded after JQuery, then hook into CRM.$ and away you go...
  
  ```
  $( document ).ready(function() {
      CRM.$(function($) {
          $(".CRM_Profile_Form_Edit").on('submit', function (e) {
              if ($('input[id^="custom_XXX_"]:checked').length != $('input[id^="custom_XXX_"]').length) {
                  $('#editrow-custom_XXX').addClass('crm-error crm-error-label');
                  alert("Please ensure you tick all options.");
                  return false;
              }
          });
      });
  });
  
  ```
  
  > NOTE: Replace "**XXX**" above with the ID of your custom field in CiviCRM (You can find this out by using the "View Source" feature in your browser and looking at the HTML Input Element for the field in question).
  
  
  ---
  
  ### Answer by username_1 on 2016-08-17. Score: 0
  
  I dont think their is some setting in CiviCRM to set all the check box to required in a single custom group
  
  But, you can create a javascript to set all the check box to Flag if one box is clicked
  
  or you can check the value of the check box before form submit and alert the user
  
  I guess this helps !!!
  
  
  ---
  
  