Hide certain languages based on embedded data | XM Community
Skip to main content

Hide certain languages based on embedded data

  • September 15, 2022
  • 3 replies
  • 176 views

Forum|alt.badge.img+1

Hello all,
I am trying to hide some languages based on the embedded data.
languagesHide.pngIf Country_Code = HK to hide English (Mainland) and Chinese Simplified (Mainland).
I have JS in the first question of the survey, which correctly assigns the language, but I can't seem to figure it out how to hide. Made this code out of a lot of solutions I have founds, so I am not surprised it doesn't work.
if(COUNTRY_CODE == "HK")
{
var chineseCNLanguage;
var englishCNLanguage;

chineseCNLanguage = jQuery('option[value="CN-ZH"').attr('lang');
englishCNLanguage = jQuery('option[value="CN-EN"').attr('lang');

chineseCNLanguage.setAttribute("hidden", true);  
chineseCNLanguage.hide();

englishCNLanguage.setAttribute("hidden", true); 
englishCNLanguage.remove();
}

3 replies

mschildknecht
Level 1 ●
Forum|alt.badge.img+3
  • Level 1 ●
  • September 19, 2022

@tcornea, try adding display logic to the individual response options by clicking to edit the choices and then clicking the drop down next to the response options. From the drop down select "Add display logic...". In the pop up, enter your conditions.
If you've never set up display logic before, this article may be helpful: https://www.qualtrics.com/support/survey-platform/survey-module/question-options/display-logic/


Forum|alt.badge.img+1
  • Author
  • September 20, 2022

mschildknecht oh, I'm sorry I wasn't clear enough before - this is about the language of the survey drop down and not a question drop down.


mschildknecht
Level 1 ●
Forum|alt.badge.img+3
  • Level 1 ●
  • September 20, 2022

@tcornea, no worries. Sorry I didn't pick up on that. To hide the language select box, check this thread: https://community.qualtrics.com/XMcommunity/discussion/247/how-do-i-remove-or-hide-the-language-selection-box-on-my-survey
To hid the language select box for some languages and show it for other, check this thread: https://stackoverflow.com/questions/46372436/qualtrics-hide-language-bar-for-certain-groups-or-set-language-based-on-respon