Matrix carousel multi select - how to set up exclusive option | XM Community
Skip to main content

Hello!

I have a multi select matrix question set up as a carousel and I would like to define one of the answer options (‘Not sure’) as exclusive.

Has anyone advise on this?

I found another post on this but unfortunately the code didn’t work.

Thank you!

Hi @EvaZw you can use custom validation to create a specific combination of conditions through which respondent can pass the questions.
NOTE: This can prove to be lengthy and complicated if you have large number of statements and scale points.


@EvaZw,

You can use this as long as you aren’t using Simple layout.

 


Thank you @TomG! The code works! I have applied it in a multi-choice carousel where the 9th column is exclusive. 

 

Qualtrics.SurveyEngine.addOnload(function() {
/* carouselExclusive.js */
/* Thomas Gibbons Consulting (qualtricswiki.tgibbons.com) */
var q = jQuery(this.questionContainer);

// Add 'exclusiveCB' class to checkboxes in column 9
q.find(".CarouselAnswerButtonContainer").each(function() {
var columnIndex = jQuery(this).index();
if (columnIndex === 8) { // Column index is zero-based, so column 9 is index 8
jQuery(this).find("(type=checkbox]").addClass("exclusiveCB");
}
});

var cbs = q.find("(type=checkbox]"),
exCbs = cbs.filter(".exclusiveCB"),
notExCbs = cbs.not(exCbs);

exCbs.click(function() {
if (this.checked) cbs.not(this).prop("checked", false);
});

notExCbs.click(function() {
if (this.checked) exCbs.prop("checked", false);
});
});

Leave a Reply