I have a 5 Matrix Likert Multiple Answers questions on one page. I’d like respondents to click on at least 8 points in total across the 5 questions before they proceed.
I did find some JS in another post that counts the answers on one question (and that disables the next button until they click enough answers), but not sure how to adjust that to check across the 5 questions…
Qualtrics.SurveyEngine.addOnReady(function(){
that = this;
var init_ques = this.getQuestionTextContainer().innerText;
this.disableNextButton();
this.questionclick = function () {
var a = that.getSelectedAnswers();
var ch = Object.values(a).reduce(function (a, b) {
return a + b;
},0);
if(ch >=3){
that.enableNextButton();
that.getQuestionTextContainer().innerText = "Okay to proceed";
} else {
that.disableNextButton();
that.getQuestionTextContainer().innerText = init_ques;
}
}
});