I have a survey with a drop down that contains names and Emails ( Last, First - Email). What i would ideally have happen is when a selection is made in the drop down parse out the email and enter that text into the response of a free text question then lock that field so it cannot be changed.
Is this possible?
Thank you!
Cameron
Page 1 / 1
You can get valur of entered email using pipe text and using java script parse it and store in embedded variable and use this embedded variable for next question piping.
Thanks for the reply! Could you give me a bit more detail on how to do that? Im pretty new to Qualtrics.
Hello @CameronBudd ,
Assuming your "free text question" is in new page(not on same page drop down question)
Also the drop down has the option exactly in this order/pattern - Last, First - Email
Paste the following code in the js(OnReady) of the "free text question"
var s="${q://QID52/ChoiceGroup/SelectedChoices}";
jQuery("#"+this.questionId+" .InputText").val(s.split("- ")[1]).attr("readonly",true);
Note: In the above code change the piped text with your question ID. Also make sure the drop down option has space after -(hyphen) and then the email.
Assuming your "free text question" is in new page(not on same page drop down question)
Also the drop down has the option exactly in this order/pattern - Last, First - Email
Paste the following code in the js(OnReady) of the "free text question"
var s="${q://QID52/ChoiceGroup/SelectedChoices}";
jQuery("#"+this.questionId+" .InputText").val(s.split("- ")[1]).attr("readonly",true);
Note: In the above code change the piped text with your question ID. Also make sure the drop down option has space after -(hyphen) and then the email.
Hey @CameronBudd! In the future, be sure to use "@" to tag and notify members if you have any follow up questions to ask!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.