Solved
Pulling part of a selection from a drop down into the response of a free text question.
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
Best answer by Anonymous
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.
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.