Hi,
I am trying to pre-select an answer based on a previous answer and have it working, when the second question is in list format and not select box format.
I have done the following javascript on the second question, the one getting preloaded:
'''
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var Instructor = "${q://QID4/SelectedChoicesRecode}";
if(Instructor.includes("57206")) this.setChoiceValueByRecodeValue(15, true);
if(Instructor.includes('80727')) this.setChoiceValueByRecodeValue(21, true);
});
'''
This works and selects the proper choices if I use list format. However, the list is about 200 options long so would really prefer the select box format so that I can use select2 to make it a nice dropdown with search.
Is there something I am overlooking? I looked at the javascript calls and did not see anything specific for the select box format.
Thanks in advance,
Brian
Question
Javascript to pre-select a question answer that is a multi-select in select box format
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
