A hidden field is a field that you'd use if you wanted a piece of information to be associated with a form but you didn't want the user to see it.

To add a hidden field to your form, add a question just like you'd add any other question and choose hidden for its type.

A hidden field can only be answered by using:

  • a default answer
  • pre-filling

Examples

We'll touch upon a couple of examples that illustrate why you might want to consider using a hidden field in your form. This not an exhaustive list, of course, but serves to illustrate how they are useful.

UTM parameters or codes

Submission data does include items like utm_campaign, utm_source, etc. when you export submissions as .csv or some integrations (such as directly through Google Sheets or via Zapier). Other than that, though, it's typically hidden from even your view as the form editor and, thus, is usually not included when using answer piping.

To get around this, you can set hidden fields with custom pre-fill keys equal to those parameters.

For example, if you want to capture the utm_source, create a hidden field with a custom pre-fill key of utm_source. Give the field a title so you can identify what this question corresponds to, but it can be whatever title works for your needs.

Then, when your URL has utm_source=twitter in it, for example, it will populate the hidden field with the custom pre-fill key of utm_source. That value can then be used elsewhere in the form, in custom emails or PDFs, dynamic success pages, or sent to another service through integration.

Identifiers

Another use-case for this is to tie subsequent submissions to a specific person. There are two ways this might be useful:

  • track a user through submissions on different forms
  • tracking a user's referrals

On their own, distinct forms know nothing about each other. If you send a user from Form 1 to Form 2, Form 2 doesn't know what Form 1 is or that the user was sent to Form 2 from Form 1.

However, you may wish to tie those separate form submissions together by user. You can do this by pre-filling a hidden field on subsequent forms with the submission ID of the first form or with an ID you create on the first form, such as through a calculation that combines multiple pieces of data on that form.

Alternatively, you may not wish to track a user through multiple submissions but rather track multiple submissions that a specific user is responsible for; that is, a referral code.

If you set a referral code in a hidden field through pre-filling, you can tie multiple submissions to that referrer.

More dynamic forms

You may wish to use pre-filling or, if the value isn't in the URL, calculate the value a different way (a different calculation, a combination of answers from the form, etc.).

You'll need a place to store this value that isn't used in anything user-facing, though. If the value isn't the URL, it can potentially mess with your formatting and/or calculations. So, you can pre-fill a hidden field with that value.

In a calculation, for example, you can use that value, if it exists, or another value if it doesn't. Suppose your pre-fill key for that hidden field is hid12. Your calculation would look similar to

x = IF({{ hid12 }}, {{ hid12 }}, some_other_operation);

Here, we'll use the value stored in hid12 only if it exists. Otherwise, we'll perform some_other_operation.

These are just a few examples of what you can do with hidden fields. Explore and experiment to come up with ways that suit your unique use-cases.

Note: While pre-filling and hidden fields are available on all plans, answer piping and calculations are only available on the Pro and Agency plans.


Did this answer your question?