Using Select2 to create an Auto-complete, Multiple Select Box Question | XM Community
Skip to main content
Solved

Using Select2 to create an Auto-complete, Multiple Select Box Question

  • February 1, 2019
  • 3 replies
  • 426 views

Hello, I am creating a survey in Qualtrics but have 1-2 questions that I need to use javascript for in order to customize. Specifically, I am trying to add a question in which the respondent will start typing a response and the survey will auto-complete the response (or pull from a very large drop-down menu). I am hoping for respondents to be able to include multiple answers. It seems like I need to use the Select2 feature but I can't figure out from the site how to do this. Where is the "header" that I need to put code into in order to use the select2 (probably using the wrong words here- I'm a newbie!)? Thank you!

Best answer by TomG

Add this to your header: ``` <link href="https://cdn.jsdelivr.net/npm/select2@4.0.6-rc.1/dist/css/select2.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/select2@4.0.6-rc.1/dist/js/select2.full.min.js"></script> ```

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • February 1, 2019
Add this to your header: ``` <link href="https://cdn.jsdelivr.net/npm/select2@4.0.6-rc.1/dist/css/select2.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/select2@4.0.6-rc.1/dist/js/select2.full.min.js"></script> ```

  • Author
  • March 10, 2019
Thank you so much for your response! I added the code to my header. Would you be able to help me with the next step? I am trying to add javascript to a question in which the respondent will start typing a response and the survey will autocomplete the response (or pull from a very large drop-down menu). I am hoping the respondent can choose multiple answers. Would you happen to know how to create code to do that? Thank you so much!

  • August 19, 2020

Hi ccesl
I'm interested in using Select2 in order to create a multi-select box like the one here.
Did you manage to find out how to create such a box? I'm reading several posts about it but none of them provides clear step-by-step information.
Best