Can I use a query string to automatically populate survey answers?
Yes, you can modify the deploy URL for a survey to include a query string that can be used to automatically populate survey answers.
You could also alternatively modify the settings for survey questions to pre-populate with certain answers; however in cases where you need the answers to be pre-populated with different information over time, using a query string when distributing the survey's URL to responders is an effective method.
In this article
Query Strings for Free Text Questions
To setup a query string to automatically populate survey answers for free text questions:
- Click Surveys in the main navigation menu.
- Click the survey title, or proceed to the Content step.
- Click the question(s) you want to be pre-populated with answers via the query string.
- For each question you want to be pre-populated, note the Question ID (5 digit number) in the lower left.
- Click the drop down arrow for the survey, and select View; or proceed to the Preview and Deploy step to access the survey URL (via Deploy Survey > Survey URL).
- Once the deploy URL is displayed in your web browser, append the end of the URL as follows:
http://yourdomain.com/s/yoursurveyid?12345=test
where "12345" is the Question ID and "test" is the pre-populated answer. - If desired, you can further append the query string with ampersands (&) and additional answers as follows:
http://yourdomain.com/s/yoursurveyid?12345=test&67890=test2
where "67890" is the additional Question ID and "test2" is the pre-populated answer for that question. - Refresh your web browser to confirm the answer(s) pre-populated, and distribute the appended URL to survey responders.
Query Strings for Multiple Choice Questions
To setup a query string to automatically populate survey answers for multiple choice questions:
- Click Surveys in the main navigation menu.
- Click the survey title, or proceed to the Content step.
- Click the question(s) you want to be pre-populated with answers via the query string.
- For each question you want to be pre-populated, note the Question ID (5 digit number) in the lower left as well as the Answer ID after the selected answer.
- Click the drop down arrow for the survey, and select View; or proceed to the Preview and Deploy step to access the survey URL (via Deploy Survey > Survey URL).
- Once the deploy URL is displayed in your web browser, append the end of the URL as follows:
http://yourdomain.com/s/yoursurveyid?12345=98765
where "12345" is the Question ID and "98765" is the Answer ID. - If desired, you can further append the query string with ampersands (&) and additional answers as follows:
http://yourdomain.com/s/yoursurveyid?12345=98765&55555=33333
where "55555" is the additional Question ID and "33333" is the pre-populated answer for that question. - Refresh your web browser to confirm the answer(s) pre-populated, and distribute the appended URL to survey responders.