GET parameters in the URL
You can use GET parameters to add attributes to the form URL. Using the GET parameters, you can automatically fill in the fields of the form that you publish by link or embed on the page using an iframe, for example:
To set up pre-filling of form fields:
-
Get the question ID and answer option ID (for multiple-choice questions).
-
Add a question mark (
?
) and the parameter to the form URL. The parameter format depends on the question type:-
For questions with an input field, such as
Short text
orEmail
:<question_ID>=<answer_text>
If there are multiple words in the answer, replace the spaces with a
+
sign. For example:https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_short_text_1685088=Planet+Earth
-
For questions with answer options, such as
One answer
orMultiple answers
:<question_ID>=<answer_ID>
For example:
To choose one answer option:
https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_choices_1685184=1958524
To add a second answer option, add the
&
symbol and specify the question ID and the second answer option ID again:https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_choices_1685184=1958524&answer_choices_1685184=1958526
-
For
Date
questions:<question_ID>=YYYY-MM-DD
For example:
https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_date_1685200=2020-01-27
-
For
Yes/No
questions:<question_ID>=True
For example:
https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_boolean_1685199=True
-
For
Rate on a scale
questions.
Choose an answer by one criterion:<question_ID>=<answer_ID>
Choose an answer by multiple criteria:
<question_ID>[<X_criterion_ID>]=<X_response_ID>&<question_ID>[<Y_criterion_ID>]=<Y_response_ID>
For example:
https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_choices_1686274=231035_231038
https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_choices_1686274[231034]=231034_231037&answer_choices_1686274[231035]=231035_231038
-
-
To fill in multiple form fields at once, add multiple GET parameters separated by
&
.https://forms.yandex.com/u/5e2ac2d850bdb705********/?answer_short_text_1685088=John+Smith&answer_choices_1685184=1958524
URLs may contain no more than 32,000 characters. The remaining data is discarded. Keep this in mind when making long queries.