Hidden fields
Hidden fields let you store information in a form without showing the field to respondents.
Updated
They are useful when you want to collect extra details alongside a submission, such as the page URL, referral source or campaign information.
For example, you can use a hidden field to record where someone found your form without asking them to enter that information.
What are hidden fields?
A hidden field collects a value without displaying an input to the respondent.
The value is included with the form submission, so you can use it when reviewing your responses.
Unlike a regular question, respondents do not need to fill in a hidden field themselves.
What information can hidden fields collect?
OG Forms supports hidden fields with different value sources, including:
- Fixed value: Store a default value that you set.
- Page URL: Record the URL of the page where the form is opened.
- Referrer: Record the page that referred the respondent to your form.
- User agent: Record browser and device information provided by the browser.
- Timestamp: Record the current date and time when the form is opened.
Using hidden fields for campaign tracking
Hidden fields can help you understand where your form submissions come from.
For example, you could create separate form links for different campaigns and use hidden fields to collect campaign information.
You can then review the submitted values alongside the respondent's answers.
Keep in mind that hidden fields are not a security feature. They should not be used to store passwords, private information or anything that respondents must not be able to access.
Do hidden fields support URL parameters?
Hidden fields support fixed default values and several built in sources.
However, setting a hidden field's value from a custom URL parameter is not currently supported as a general prefill feature.
For example, automatically reading a campaign value from a link such as ?campaign=spring is not available yet.