[User Guide]
[Crosstec/Breezing Forms]
as noted in this PDF.
Conditional Checkbox Validation I have three checkboxes in a group. Can I make them dependent on each other so that if checkbox 1 is checked, you can't check checkbox 2 or 3. If checkbox 2 is checked, you can't check 1 and 3, etc? In other words, of the three checkboxes, you can only check one option. If it is a case where you only want to allow the user to choose one option out of a group, then you might want to use a Radio Group instead of a checkbox group. If there is some other reason why you need those checkboxes to be conditional however (for example, for a following visibility rule), then you can do so by putting a custom validation in the checkbox group. In the Validation section at the bottom of the checkbox element, click on the CUSTOM button. In the textarea that opens, paste in the code below. Then make changes as noted in the CHANGES REQUIRED section below.
function ff_mygroup_validation(element, message) { // initial checked states for your box, add more or less, depending on your amount of checkboxes of your group // if you have checkboxes that are initially checked, set the corresponding value here to "true" var checkedBoxes = [false,false,false]; for(var i = 0; i < document.ff_form140.elements.length; i++){ if(document.ff_form140.elements[i].type == "checkbox" && document.ff_form140.elements[i].name == "ff_nm_mygroup[]"){ if( document.ff_form140.elements[i].checked ){ checkedBoxes[i] = true; }else{ checkedBoxes[i] = false; } } } // the rules apply here // add or remove rule depending on your amount of checkboxes if(checkedBoxes[0] && ( checkedBoxes[1] || checkedBoxes[2] ) ) return 'You can only check box 1'; if(checkedBoxes[1] && ( checkedBoxes[0] || checkedBoxes[2] ) ) return 'You can only check box 2'; if(checkedBoxes[2] && ( checkedBoxes[0] || checkedBoxes[1] ) ) return 'You can only check box 3';
Page 69