- Posts: 40
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
I am referring to this post - www.limesurvey.org/en/forum/can-i-do-thi...n-empty-radio-button .this is no double posting...1st Posting is my question about prevent empty radio button if 1st Multiple question and 2nd question is Single Question
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Hide the "N/A" column $('table.question thead th:last', thisQuestion).hide(); $('tr.answers-list', thisQuestion).each(function(i) { $('td:last', this).hide(); }); // If the last row has no label text, hide it and click the hidden "N/A" option if($.trim($('tr.answers-list:last .answertext', thisQuestion).text()).length == 0) { $('tr.answers-list:last input.radio:last', thisQuestion).prop('checked', true); $('tr.answers-list:last', thisQuestion).hide(); } else { $('tr.answers-list:last input.radio:last', thisQuestion).prop('checked', false); } }); </script>