Configure pre-filling forms
You can configure a form so that when it's opened, specified values are automatically inserted into fields or certain responses are pre-selected.
You can use pre-filling forms:
-
To suggest responses that you think are preferable or most likely.
-
To pass auxiliary or technical parameters to hidden fields in the form (for example, for gathering statistics).
To set a field value or select a response option, send the question ID and the response valueto the form using GET parameters in the form URL
Configure pre-filling a hidden field
You can use hidden fields to automatically send technical or auxiliary parameters, such as UTM tags, to the form. This way, you can add more information to user responses for analytics and statistics.
Let's say you created a form and posted it on different websites. Now you want to know which site the user filled the form out on. To do this, use the UTM tag
utm_source
.
Add a hidden Response source
field to the form. Add a GET parameter to the link, and the parameter value will automatically be sent to the hidden field. Then you can see where your user responses came from.
To configure a hidden parameter for this example:
-
Add a
Short text
prompt with theResponse source
name to the form. -
Turn on Hidden question for this prompt.
-
In the Question ID field, specify
utm_source
: This is the name of the GET parameter. -
Get a link to the form and append it to the GET parameter
?utm_source=site_name_1
.- Example of a link to a form without a GET parameter:
https://forms.yandex.ru/u/6191b18d99e21b1b45b9c82/
- Example of a link to a form with a GET parameter:
https://forms.yandex.ru/u/6191b18d99e21b1b45b9c82?utm_source=site_name_1
-
Post a link to the form with the GET parameter on the website.
-
In the same way, create another link to be placed on another site. To do this, append the GET parameter
?utm_source=site_name_2
. -
When a user follows the link, the
site_name_1
orsite_name_2
value is automatically entered in theResponse source
hidden field. You can use this value in the response to determine the site the form was filled out on.
To enable pre-filling of the hidden field when embedding a form in a website using iframe, specify the URL with the configured GET parameters in the iframe embedding code.