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

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

  • 29 January 2021
  • 3 replies
  • 180 views

Userlevel 3
Badge

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.

icon

Best answer by ahmedA 29 January 2021, 17:54

View original

3 replies

Userlevel 7
Badge +21

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())

Userlevel 3
Badge

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

Userlevel 7
Badge +21

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