Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Moving automatically to next bquestion

More
9 years 7 months ago #129695 by tpartner
It looks fine to me Bruce.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: bruce78
The topic has been locked.
More
9 years 7 months ago #129696 by bruce78
Thanks Tony!
The topic has been locked.
More
9 years 4 months ago #134212 by first
bruce78

I used your script and we need to add some more line of codes to handle array dual scale otherwise it will autosubmit without answering whole question.
Code:
function autoForward() {
    var timeOut = '';
    if($('.radio').length > 0 && $('.radio:checked').length === 0) {
    var totalQuestions = 0;
    var dualScaleQuestions = $('div.array-flexible-duel-scale:visible').length
    if(dualScaleQuestions > 0){
      totalQuestions = totalQuestions = $('div.list-radio:visible').length + ($('tr.radio-list:visible').length * 2);
    }else{
      totalQuestions = 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);
 
            }
        });
    }
}

Survey Designer and Programmer
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose