Hi,
Hoping someone can help! I am trying to set up the survey flow so participants are allocated to one of four groups. I would like their language choice (EN or PT) to determine whether they are placed in either an EN or PT group and then randomiser to split them to either intervention or control - therefore they will be four groups in the end (intervention EN, waitlist EN, intervention PT, waitlist PT). I have looked through many posts on here and have tried to implement a flow based on what I have read but it still isn't working - e.g. even if I select PT as the language, I could still get allocated to the intervention EN group. Is it even possible to do what I am trying to achieve just in the survey flow? Screenshots of what I currently have in the flow:
Many thanks in advance!!!
What you have basically looks correct. However, those branches would have to be after the first question block where they select a language. If it is before that it will always be the default language (EN).
Thanks for your reply Tom. I think that might be the problem, how can I insert a question where they select their language and the language of the survey changes? At the moment, it is just a drop down button at the top right of the screen. Many thanks
https://www.qualtrics.com/community/discussion/comment/31019#Comment_31019You would write JavaScript to do that. It would change the value of the language drop down down when a choice is selected.
OK, thanks for your help!
Hi TomG
I added this JS to a question 'Please choose your language' but it still isn't working (if language selected is EN, the PT group can still be chosen and vice versa) - any tips please?
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("select[id='Q_lang']").hide();
var selectedRecode;
this.questionclick = function(event, element) {
if(element.type == "radio")
{selectedRecode = Number(this.getChoiceRecodeValue(this.getSelectedChoices()));
if (selectedRecode == 1) {
jQuery("selectrid='Q_lang']").val("EN");
jQuery("selectrid='Q_lang']").trigger( "change" );
Qualtrics.SurveyEngine.setEmbeddedData("language","EN")
}
else {
jQuery("selectrid='Q_lang']").val("PT");
jQuery("selectrid='Q_lang']").trigger( "change" );
Qualtrics.SurveyEngine.setEmbeddedData("language","PT")
}
}
}
});
https://www.qualtrics.com/community/discussion/comment/31059#Comment_31059You'll want to hide the language selector throughout the whole survey. Add this to Look & Feel Custom CSS:
.LanguageSelectorContainer { display:none; }
Also:
- With the CSS above, you don't need to hide Q_lang in the script
- You don't need the embedded data field "language"; the embedded data field Q_Language always contains the current language.
Hi Beth_R123 ,
I'm dealing with a similar issue as the one you posted directly above. Did you ever find a solution and if so would you mind sharing it?
thanks,
Brian
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.