Using Select2 to create an Auto-complete, Multiple Select Box Question | XM Community
Skip to main content
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!
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>

```
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!

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


Leave a Reply