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

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

  • Jan 28, 2021 11:02 PM UTC
  • 3 replies
  • 405 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 ●●●●●●●
  • Jan 29, 2021 9:22 AM UTC

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 ●
  • Jan 29, 2021 2:50 PM UTC

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 ●●●●●●●
  • Answer
  • Jan 29, 2021 4:54 PM UTC

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"}