- Posts: 3
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ var maxAllowed = {TOKEN:ATTRIBUTE_1}; // Listener on the radios $('.yes-no input[type="radio"]').on('click', function(e) { // Reset the radios $('.yes-no input[type="radio"][value="Y"]').prop('disabled', false); // Test for max allowed if($('.yes-no input[type="radio"][value="Y"]:checked').length == maxAllowed) { // If true, disable all unchecked "Yes" radios $('.yes-no input[type="radio"][value="Y"]:not(:checked)').prop('disabled', true); } }); }); </script>