HI all,
I have a customer who wants to make a set of radio buttons required based on another field selection. They are using the classic designer so the only way to accomplish is by using JS.
We added the following JS to test making the radio buttons required
$(document).ready(function() { $('#q15 input').attr('required', 'True'); $('#q15 .cf-label').append('<span class="cf-required">*</span>'); }); //end of $(document).ready(function() {
but when the requirement is triggered it only selects the top radio button
When using the built in form required field on a radio button it displays as selecting all of the radio options
We have tried several different selectors but we are at a loss for how to replicate the behaviour. We would like to have consistency between setting the radio buttons required via JavaScript or through form controls as their form design has a few areas of radio buttons that may be required all the time but only selected ones would be required based on another selection.
Any help you can provide would be appreciated.