JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<form id="frm" action="#" method="post">
<input type="checkbox" name="chb1" id="chb1" checked="checked"/>
<input type="checkbox" name="chb2" id="chb2"/>
<input type="checkbox" name="chb3" id="chb3" checked="checked"/>
<input type="submit" id="sub" value="Call"/>
</form>
<div id="echo">Click to call and see if form is submitted</div>
</body>
JavaScript
$('#frm').bind('submit', function(e) {
$('#sub').attr('disabled', 'disabled');
validForm = true;
var n = $( "input:checked" ).length;
if (n != 1) { validForm=false; }
if (!validForm) {
e.preventDefault();
$('#sub').removeAttr('disabled');
$('#echo').html("Not submited, you must check only 1 checkbox.<br/>Actual checked comboboxes: "+n);
}
else {
$('#echo').html("OK, submited");
}
});