Hidden fields
A hidden field carries a value you already know into the response: a customer ID, a campaign name, an order number. Respondents do not see it and cannot change it in the form. Hidden fields are available from the Professional plan up.
Declaring hidden fields
Section titled “Declaring hidden fields”hidden is a list of names.
"hidden": ["user_id", "plan", "utm_source"]- A name is made of letters, digits and underscores, and is unique in the form.
- A hidden field has no type and no default value. Values are text.
- Only declared names are picked up. Other parameters of the link are ignored.
These names are refused by the editor because the form uses them itself: form_id, email_token, email_token_email, mode, dev, preview. Also avoid lang, token and widget, which are parameters of the form link.
Passing values
Section titled “Passing values”In the link
Section titled “In the link”Add the fields to the form link as query parameters:
https://form.responsly.com/f/AbCd1234?user_id=42&plan=proEncode values as in any URL. Markup is removed from values: they are stored as plain text.
From an invitation
Section titled “From an invitation”When a form is sent to contacts with personal invitation links, a contact field with the same name as a hidden field fills it. The contact’s value wins over a value in the link.
From a mobile app
Section titled “From a mobile app”The Mobile SDK fills hidden fields from the app: values your code sets, the identified user’s ID for user_id, and user attributes with matching names.
Fields added by the form
Section titled “Fields added by the form”Some values are stored with the hidden fields without being declared.
| Name | Value | When |
|---|---|---|
lang | Language the respondent used. | The form has more than one language. |
email_token | Token of the invitation link. | The form was opened from a personal invitation. Not stored for anonymous invitations. |
email_email, email_phone | Address or phone number the invitation was sent to. | Same. Not set for anonymous invitations. |
widget_source_url | Address of the page the form is embedded on. | The form runs in the website widget. |
ab_testing | Version number. | A/B testing is on. |
Using hidden fields
Section titled “Using hidden fields”| Where | How |
|---|---|
| In texts | {{hidden:<name>}} in a title, a description or an end page address. See Inserted values. |
| In logic | As the left operand { "type": "hidden", "value": "<name>" } with the text operators. See Logic. |
| At the start of the form | The hidden rule block routes respondents by a hidden field before the first question. See Rules at the start. |
| In responses and webhooks | hidden: a list of { "name", "value" }. See Answers. |
| In results | A filter in the results table and one column per field in exports. |
| In notification e-mails | {{hidden:<name>}} and {{form:hidden}}. |
Example
Section titled “Example”A link …?first_name=Anna&plan=pro with this end page:
{ "title": "Thank you, {{hidden:first_name}}!", "properties": { "description": "", "show_button": true, "button_label": "Back to your account", "button_url": "https://example.com/account?plan={{hidden:plan}}&response={{response:id}}" }}and this part of the response:
"hidden": [ { "name": "first_name", "value": "Anna" }, { "name": "plan", "value": "pro" }]