Pulling part of a selection from a drop down into the response of a free text question. | XM Community
Skip to main content
Solved

Pulling part of a selection from a drop down into the response of a free text question.


Forum|alt.badge.img+1
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 original

4 replies

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1149 replies
  • October 11, 2018
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.

Forum|alt.badge.img+1
  • Author
  • 5 replies
  • October 11, 2018
Thanks for the reply! Could you give me a bit more detail on how to do that? Im pretty new to Qualtrics.

  • 0 replies
  • Answer
  • October 12, 2018
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.

LaurenK
Former XM Community Team Member
Forum|alt.badge.img+13
  • Former XM Community Team Member
  • 900 replies
  • October 18, 2018
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