Open KeppensJonas opened 6 years ago
First post, so be gentle if I am doing it incorrectly. :)
I ran into this problem and handled it by grouping all the checkboxes with a class name, and had each call a little "uncheck all" / "check current" method when clicked. I used checkboxes, but it should work just as well with radio buttons.
HTML
<input type="checkbox" id="CtrlName" name="CtrlName" class="group-name" onclick="markCheckBox(this.attributes['name'].value);" value="" />
JavaScript
function markCheckBox(ctrl) {$('input:checkbox.group-name').prop("checked", false);
$("[name='" + ctrl + "']").prop("checked", true);
}
I have this in my code:
when I add more items with the form repeater I can always select all the radio buttons while there is a group name. What's the problem here?