!
Best answer by Anonymous
View originalBest answer by Anonymous
View originalIs there any way to get this code to work to highlight just individual statements/lines within the matrix question (as opposed to highlighting all statements, completed or not)? Thanks.
Hello, it is possible to modify the code so that it highlights unanswered statements within a matrix table with 'request response' selected rather than 'force response'? Thanks!
https://www.qualtrics.com/community/discussion/comment/32186#Comment_32186The following code should work for you:
let my_interval;
Qualtrics.SurveyEngine.addOnReady(function(){
let attempt = 1;
document.querySelector("#NextButton").onclick = function() {
my_interval = setInterval(() => {
err_msg = document.querySelector("#ErrorMessage");
if (err_msg != null) {
console.log("done");
solver();
clearInterval(my_interval);
}
}, 10);
};
that = this;
var n = jQuery("#"+this.questionId+" .ChoiceRow").length;
function solver (){
attempt++;
for(var i=0;i
jQuery("#"+that.questionId+" .ChoiceRow:eq("+i+")").css("background","lightpink");
}
}
}
this.questionclick = function(){
if(attempt>1){
for(var i=0;i
jQuery("#"+that.questionId+" .ChoiceRow:eq("+i+")").css("background","");
}
}
}
}
});
Qualtrics.SurveyEngine.addOnUnload(function() {
clearInterval(my_interval);
});
https://www.qualtrics.com/community/discussion/comment/32400#Comment_32400Hey could you provide this exact code except for a "side by side" instead of a matrix table?? that would be so great!
Have you tried this code? It should work for SBS also.
https://community.qualtrics.com/XMcommunity/discussion/comment/32400#Comment_32400Hi ahmedA , is there any other code for a slider question? I have tried to use this code for a slider question but it doesn't work.
Thank you very much.
I wonder if there is a method to do this with the Form question type?
This was great, but I’m using statement groups and if one selection is not made in one statement group, it highlights are the statement group headers. Any modification for this, please and thank you?!
This was great, but I’m using statement groups and if one selection is not made in one statement group, it highlights are the statement group headers. Any modification for this, please and thank you?!
You might be interested in the matrixHighlightUnanswered function. It has much more functionality than the code above, including compatibility with statement groups.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.