JS for populating answer choice with prior responses from other respondents | XM Community
Skip to main content
Hi, I'm trying to set up a form that populates a dropdown list with prior responses to the survey. The survey has a field for entering a project title for new submissions. Then when people come back to make updates about their project, I want them to be able to choose which project they're updating from the list of all project titles that have been submitted.



I found a solution that looks exactly like what I want here: https://www.qualtrics.com/community/discussion/2959/populate-answer-choice-with-prior-responses-from-other-respondents. I was able to set up a trigger that adds all new projects to a contact list.



However, I'm not super familiar with JS and I'm stuck on the part of the answer that deals with the JS:

Also we need to make Q2 open ended and hide Input text and replace with drop down with options of embedded data (comma separated) using JS. Now on change event of the Custom drop down we need to put the selected option text in the hidden input text field.

I get the idea but I don't know enough about JS to know how to do what's described here.



Any examples of JS code that would accomplish this? thank you!
Two people asking the same question on the same day. See:

https://www.qualtrics.com/community/discussion/9061/can-i-make-a-drop-down-menu-populated-by-previous-responses

Leave a Reply