How do I add a hidden field to my form?

* Applies to inline forms only. Hidden fields cannot be added to floating box, floating bar, or modal forms.

A hidden field can be used to pass information about contacts into your account when they submit your form. This field is not visible to your contacts. You can use a hidden field to collect information, such as UTM parameters, or even use it to help identify spam bot submissions.

This article will show you how to create a hidden field, how you can use them to collect information about your contacts, and how they can be used to identify spam submissions.

Create a hidden field
To add a hidden field to your form:

  1. Click on "Form" from the top menu.
  2. Click “Edit” for the form you wish to add a hidden field to.
  3. If your hidden field does not yet exist, click the “Add Custom Field” button located on the bottom right of your screen.
  4. Select “Hidden Field.”
  5. Give your hidden field any label you wish. In this example, I called mine "Hidden Field."
  6. Drag the field from the right side menu and drag it into your form.


How hidden fields can be used to collect information about your contacts
Now that you have added a hidden field to your form, you may be wondering how exactly that field will collect information about your contacts. There are a few different ways to go about this:

Add a query string to your form's URL
This method will add a fixed value to your hidden field.

For example, let's say I have a hidden field called “Hidden Field” in my form and the personalization tag for that field is %HIDDEN_FIELD%.

When a contact submits my form, I want that hidden field to display the value of “Test” in that contact's profile page.

To do that, I would need to fetch the personalization tag for that field (go to Forms>Manage fields) and remove the percent (%) signs.

Then I would grab my form's URL:

and append it with this: ?hidden_field=Test

so that the form URL now looks like this:

This is how the form looks in an account. Note the hidden field:


This is how the form will look from the contact's point of view. Note the appended form URL:

When a contact submits my form, this is what I will see in their contact profile page. Note that the value for my hidden field is "Test":


NoteIf you wish to pass UTM parameters into a hidden field, then you would need to create a hidden field and modify its associated personalization tag to use an underscore, so that it matches the URL parameter. 

Add a fixed value to your full embed code
After adding your hidden field to your form, copy and paste the full embed code to your site. Then, insert your fixed value for that hidden field into your form's html code.

Here is an example showing you where to add that fixed value:


Add a dynamic value to your full embed code
You can add custom code your site to dynamically “post” information to your hidden field when a form is submitted. This option will require custom coding on your end.

Identify spam submissions
To use a hidden field to identify spam submissions, all you need to do is add a hidden field to your form and leave it blank. You may want to label this hidden field “Spam” or “Spam Contact” so you can easily identify it later. Then, if your form is submitted with a value for that field, you'll know that a spam bot submitted your form and not an actual person. It is important to note that this is not entirely foolproof as smart bots will not fill out a hidden field. The best way to protect your form from Spam submissions is to add a CAPTCHA to your form and to enable a double opt-in

Have more questions? Submit a request