All Collections
API Documentation
Survey URL parameters
Submitting answers to survey questions in the URL – Prefill
Submitting answers to survey questions in the URL – Prefill
Piotr Sadowski avatar
Written by Piotr Sadowski
Updated over a week ago

Thanks to the special function of Startquestion survey software, it is possible to provide answers to survey questions using parameters in the URL of a given questionnaire.

This function allows, for example, to end the whole questionnaire and provide answers to all questions in the form of one extended URL link or to supplement part of the answers in an open questionnaire.

This function can be used at all levels of the survey’s access as well as with the external_key parameter.

Examples of addresses

A standard link to the survey may look like this: https://startquestion.com/survey/159877/motivation-system-evaluation.html

In the parameters q1, q2, q3 … individual answers to questions are transferred.

Supported questions

Single choice questions – parameter values ​​q eg 1,2,3 … mean each subsequent answer where 1 is the first of available answers, 2 – second, 3 – third etc. In this case the answer „other, what?” is not supported.

Drop-down list – they work the same way as single-choice questions.

Multiple choice questions – the q parameter can take two or more values, eg q3 = 1,3,6 according to the selected answers. As in the case of single-choice questions, the answer „other, what?” is also not supported.

NPS questions – the value of parameter q is the number of the answer. For example, q1 = 11, where 11 is the answer number, i.e. the answer is 10.

Open questions – the parameter value is the answer entered. E.g. q5 = Holiday, above, sea.

The questions about the number, e-mail address, date – value of the parameter appropriately contains the answer, e.g. number – q4 = 483, e-mail address – q6=john.smith@example.com, date – q7 = 15% 2F09% 2F2015.

Form questions – answers from the form fields are passed as the next parameter values, eg in the question about name, surname, telephone number, age: q8 = John, Smith, 987654321,42, if the respondent does not state the name, the parameter value will look as follows: q8 = John,, 98765431.42.

Question with the allocation of points – the points allocated are passed as the next parameter values, e.g. q10 = 155,135.50.

Note! The other types of questions are not supported.

Access levels

As mentioned above, this feature works for all levels of access.

  • One link for everyone – no additional indications.

  • One password protected link for everyone – in the URL link, the password for the questionnaire must be passed through the parameter h, eg: ?h= complicated_password.

  • Personal link for each respondent – a token must be passed in the URL link with the parameter t, eg: ?t = B9e53A.

Logic of questions and answers

In the case of questions, from the answers that depend on the next question displayed, the answer function in the URL also works correctly and the logic is retained. If in the value of the parameter q is passed the answer to the first question, which determines what question will be displayed next, the survey will verify the answer accordingly and display the correct dependent part.

Showing a partially completed survey

In the case of providing answers in the URL to the part of the survey questions, the survey pages are displayed depending on the number of parameters provided.

If all questions are answered from a given page, the page will no longer be displayed to the respondent.

If you only answer some of the questions from a given page, the page will be displayed to the respondent so that the respondent can give you the missing answers.

Redirects to an external address

The redirection to an external address also works when using the Prefill function. The redirection feature works from each level of the survey: redirection from the question, redirection from the page, redirection after completing the survey.

The external_key function

Passing an external identifier with the external_key parameter works in the same way as with the classic URL link.

Embedding the survey on the external domain

If the survey is embedded on an external domain, the link to this survey using the Prefill function looks as follows:

Note! It should be remembered that all the parameters used in the survey URL should be obtained before connecting the external domain survey.

Did this answer your question?