Skip to content

Instantly share code, notes, and snippets.

@marketinview
Created September 11, 2024 13:39
Show Gist options
  • Save marketinview/48187d5251ac0fedf555cbd0f2ac7c7a to your computer and use it in GitHub Desktop.
Save marketinview/48187d5251ac0fedf555cbd0f2ac7c7a to your computer and use it in GitHub Desktop.
Qualtrics: Select Language with Multiple Choice. Hides the language drop down selector and has the respondent pick language in a Multiple Choice question. Specify language codes in choice html. #qualtrics #js #jq #mc #language #translate
.LanguageSelectorContainer, span.langCode { display:none; }
English<span class="langCode">EN</span>
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" input[type=radio]").click(function() {
jQuery("#Q_lang").val(jQuery(this).closest("li").find("span.langCode").text()).trigger('change');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment