Hello all,
I am trying to hide some languages based on the embedded data.
If 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('optionnvalue="CN-ZH"').attr('lang');
englishCNLanguage = jQuery('optionovalue="CN-EN"').attr('lang');
chineseCNLanguage.setAttribute("hidden", true);
chineseCNLanguage.hide();
englishCNLanguage.setAttribute("hidden", true);
englishCNLanguage.remove();
}
@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/
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.
@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
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.