Expandable Drop Down Menu | XM Community
Question

Expandable Drop Down Menu

  • 3 August 2020
  • 2 replies
  • 19 views

I am looking to create an expandable drop down menu using JS. For example, the drop down menu would initially include 15 commonly-chosen countries, with an option to expand the drop-down list to include all 200+ countries.
I've searched the threads and haven't found any examples of this


2 replies

Badge +2

Have you considered using a Select2 drop-down? Select2 allows you insert a very user friendly search bar in the drop-down question, which could make selecting an answer choice easy. Also, you could order the answer choices so that the 15 commonly-chosen countries are listed first. Do a search in the community to learn more about Select2 implementation and use cases.

Hi Rusty
I'm interested in using Select2 in order to create a multi-select box like the one here.
I'm reading several posts about it in the community but none of them provides clear step-by-step information on how to implement it. I've tried doing it by copy-pasting the code into the header, then including the other JS code into the question, but not sure where the HTML code goes given this is a multi-select box question.
Any leads on what I'm missing?
Best

Leave a Reply