Is there a way to add a label above the language selection drop-down? | XM Community
Solved

Is there a way to add a label above the language selection drop-down?

  • 19 July 2018
  • 5 replies
  • 116 views

Badge
I want to make the drop-down for language very obvious to respondents.
icon

Best answer by MohammedAli_Rajapkar 25 July 2018, 18:23

View original

5 replies

Userlevel 7
Badge +20
Yes, you can do that through below jQuery. You will have to add this jQuery under the "Look&Feel" -> Advanced -> Header part

(please change "}" the closing bracket for script tag to ">" )

<script}
jQuery(".LanguageSelectorContainer").append("<div id='appenddiv'>Please select Language</div>");
jQuery("#appenddiv").after(jQuery("#Q_lang"));
</script}
Badge
Hello!

Thank you, but I added that into the header and it did not work. Is there something else I'm supposed to do? The text just showed up in the header, nothing else.
Userlevel 6
Badge +6
Make sure you add it while looking at the source view rather than the rendered text.
Badge
Is it possible to have the text displayed above the drop down rather than on the side? Also, will this text be translated automatically?
Userlevel 7
Badge +27
> @AngieMP said:
> Is it possible to have the text displayed above the drop down rather than on the side? Also, will this text be translated automatically?
Create an MC question at the beginning of your survey for translations and hide it with display logic (add a condition that is always false, such as the non-existent embedded variable "hide" equal 1). Make the first choice "Select a language" and translate it to whatever languages you need.

Then pipe the translated choice description into your script. The script that you put inside a `<script>` tag in your header becomes (change the QID accordingly):
```
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("div.LanguageSelectorContainer").prepend("<div>${q://QID2/ChoiceDescription/1}:</div>");
});
```

Leave a Reply