Pre-populate Multiple Choice Question(s) via Query Strings and Q_PopulateResponse | XM Community
Skip to main content
Solved

Pre-populate Multiple Choice Question(s) via Query Strings and Q_PopulateResponse

  • January 28, 2021
  • 3 replies
  • 317 views

Forum|alt.badge.img

I want to pre-populate my survey by passing information via Query Strings and Q_PopulateResponse
It works for text entry fields and does not work for multiple-choice question:
YourSurveyURL?Q_PopulateResponse={"QID7":"Alex","QID9":"123456789","QID13":"abcd1234@email.com","QID21":"Year-1"}
QID21 is multiple-choice question and it does not pre- populate.

Best answer by ahmedA

The JS code is just for you to see choices. Sometimes, because of editing the choices, rather than going 1,2,3 etc. You could get something like 14,15,16 etc.
Once you've seen the choices the url will be like {"QID21" :"1"}

View original

3 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2028 replies
  • January 29, 2021

For multiple choice you need to refer to the choiceID. It will be something like "1", "2" etc. and not "Year-1".
You can see the choices adding this to your question JS

console.log(this.getChoices())


Forum|alt.badge.img
  • Author
  • Level 1 ●
  • 53 replies
  • January 29, 2021

https://www.qualtrics.com/community/discussion/comment/33892#Comment_33892Do you mean adding the above JS code to that multiple-choice question ?


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2028 replies
  • Answer
  • January 29, 2021

The JS code is just for you to see choices. Sometimes, because of editing the choices, rather than going 1,2,3 etc. You could get something like 14,15,16 etc.
Once you've seen the choices the url will be like {"QID21" :"1"}


Leave a Reply