Solved
How to group multiple choices in Multiple Choice question?
Hi, Qualtrics community
We have a list of options for subjects to select from. I use Multiple Choice question-->Multiple Answers. But I want to group the options and make subjects select more than one options.
I tried to add groups and assign options to different groups. But I found that the layout can only be verticle. I think the list of options is too long and want to use matrix layout. How can I do that?
Here is a picture which depicts how I want to design the layout of the questions. Could anyone help me?
Thanks very much!
(The attached file shows the design)
Best answer by Anonymous
Hello @cqulihui ,
Paste the below code in the js(OnReady) of the matrix profile question
var that =this;
var r = ["1,2","2,1"];
for(var i=0;i<r.length;i++){
var t1 = parseInt((r[i]).split(",")[0]);
var t2 = parseInt((r[i]).split(",")[1]);
jQuery("#"+this.questionId+" .ChoiceRow:eq("+(t1 - 1)+") .c"+(t2 + 3)+"").hide();
}
You need to only change the var r line. The var r is set in the below format.
var r = ["r1,c1","r1,c2",....,"rn,cn"];
Hence you need to make row and column pair to hide particular choice. So to hide third and fourth choices in the second row the r will be as below
`var r = ["2,3","2,4"];`
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
