I have a multiple choice drop down field of site (Bath, Birmingham, Cardiff etc.)
In the same block as the next question I have a text entry field of participant ID. This is always in the format of S
Is it possible to pre-populate the participant ID text feild with the S
I believe I could do it by putting the site in a different block and then creating embedded data that can be piped in as a default response but wondered if there's a way of doing it so I don't have to break up the block?
Page 1 / 1
You can use JS attached your drop down question:
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
var sites = {Bath:"01",Birmingham:"02",Cardiff:"03"};
var siteName = jQuery("#"+this.questionId+" select option:selected").text();
Qualtrics.SurveyEngine.setEmbeddedData("siteCode",sites[siteName]);
});
Then the default choice on your participant ID question would be:
S${e://Field/siteCode}/nnn
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.