I need to display 4 random choices from a list of 15, in random order. But I want to add specific text before the selected choices. For example, if the choices are 1,2,..,15 and choices 9, 4, 2, 7 are selected, I want the following choices displayed:
A9
B4
C2
D7
(Note - the text follows a fixed order - A for the first choice, etc).
Easiest way to do this? Any help would be very appreciated.
Thanks!
Page 1 / 1
You'll need to use JavaScript. First, add a empty span with a class to the beginning of all your choices. For example:
9
Add JS to question:
Qualtrics.SurveEngine.addOnload(function() {
var prefixes = ["A", "B", "C", "D"];
jQuery("#"+this.questionId+" .prefix").each(function(i){ jQuery(this).html(prefixes[i]); });
});
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.