Ask the community, share ideas, and connect with other LimeSurvey users!
$(document).ready(function(){ $('tr.radio-list input.radio').bind('click', function () { var thisArray = $(this).closest('table'); if($('input.radio:checked', thisArray).length == $('tr.radio-list', thisArray).length) { $("#movenextbtn,#movesubmitbtn").delay(300).click(); } }); });
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#question{QID} input[type="radio"]').on('click', function(){ $('#movenextbtn, #movesubmitbtn').delay(300).click(); }); }); </script>
function autoForward() { var timeOut = ''; if($('.radio').length > 0 && $('.radio:checked').length === 0) { var totalQuestions = $('div.list-radio:visible').length + $('tr.radio-list:visible').length; $('.radio').on('change', function () { clearTimeout(timeOut); if ($('.radio:checked').length === totalQuestions && !$(this).closest('.answer-item').hasClass('other-item') && $('textarea:visible').length === 0 && $('.checkbox:visible').length === 0) { timeOut = setTimeout(function () { $('#movenextbtn').click(); }, 500); } }); } }
$(document).ready(function() { $('.mandatory').not('.mandatory:eq(0)').hide(); var questionTotal = $('.mandatory').length, answeredTotal = 0; $('.radio').on('change',function() { var visibleQ = $('.mandatory:visible'); if(visibleQ.find('.radio:checked').length > 0) { answeredTotal++; visibleQ.hide().next('.mandatory').show(); } if(questionTotal === answeredTotal) { $('#movesubmitbtn').click(); } }); });