- Posts: 72
- Thank you received: 17
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { if($('#question{QID} input.radio:checked').length > 0) { radio.disabled = true; } }); </script>
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#question{QID} input.radio').on('click', function(e){ $('#question{QID} input.radio').not(this).prop('disabled', true); }); }); </script>
tpartner wrote: Try this:
Code:<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#question{QID} input.radio').on('click', function(e){ $('#question{QID} input.radio').not(this).prop('disabled', true); }); }); </script>
holch wrote: Hmmm, I think I was judging too quick. I was using the same question for another issue to test something and I noticed that when you click on the answer option instead of the radio button, the radio buttons stay the same, but the response changes...
Oops, forgot about the labels - try this:Hmmm, I think I was judging too quick. I was using the same question for another issue to test something and I noticed that when you click on the answer option instead of the radio button, the radio buttons stay the same, but the response changes...
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#question{QID} input.radio').on('click', function(e){ $('#question{QID} input.radio').not(this).prop('disabled', true); $('#question{QID} input.radio:checked').prop('disabled', false); }); }); </script>
<script type="text/javascript" charset="utf-8"> $('#question{QID} input.radio').on('click', function(e){ $('#question{QID} input.radio').not(this).prop('disabled', true); $('#question{QID} input.radio:checked').prop('disabled', false).trigger('click'); }); </script>