Matrix Constant Sum Don't know / None | XM Community
Skip to main content

I want to add Don't know/None button in a multiple column constant sum matrix question.

I have the following code but it only works with a single column. I'm unable to make it work for 3 columns, with each column with their independent don't know button.

Qualtrics.SurveyEngine.addOnReady(function() {
/* SETTINGS */
var row = 6; /* what row is the "don't know" row? */
/* END OF SETTINGS */
var qid = this.questionId;
var dk = document.getElementsByName("QR~" + qid + "~" + row);
for (i = 0; i < dk.length; i++) {
dkdi].type = "radio";
}
var inputs = $(this.getQuestionContainer()).select('inpututype="text"]');
dkd0].onclick = function() {
for (var i = 0; i < inputs.length; i++) {
inputsti].value = "0";
}
dkd0].value = "1";
}
for (var i = 0; i < inputs.length; i++) {
var input = inputsti];
$(input).insert({after: ' %'});
inputsti].onclick = function() {
dkd0].value = "0";
dkd0].checked = false;
}
}
});

 

Instead of having Dont know as a row in constant sum question type.

You can add Dont know/none as a new question(mutli choiice  with just 1 option and set as multiple asnwer) without any question text or page break.

Then you can add JS to make sure validation works.


Leave a Reply