Use Hidden Fields with Form CTAs


Learn why and how to use hidden form fields on your Form CTAs.


Before You Begin

  • Hidden form fields are an optional feature that can be configured on Form CTAs. To learn about working with Form CTAs in general, see this article. In addition, you can find information and instructions specific to form fields in this article.


About Hidden Form Fields

When you set up a Form CTA and customize the form fields that appear on it, you can choose among several different types of fields. Most of these are self-explanatory, such as text, dropdown, etc. But one that isn't quite as straightforward at first glance is the hidden field type. As the name suggests, a hidden field is unlike the other types because it's not user-facing. Instead, its purpose is to help automate tracking and attribution.

Here's how it works: whenever a visitor to your Hub submits a Form CTA, the data they entered into the form fields is used to populate a lead profile in your Marketing Automation Platform (MAP). In many cases, it can be really helpful to add contextual information to a lead profile, such as where the lead was referred from, or if the CTA they used was part of a particular campaign.

This is where hidden fields come in. You can use a hidden field to pass a value of your choice to a specified field in your MAP each time the CTA is submitted. This value can be a fixed text string (such as a campaign name, marketing persona, etc.), or you can automatically populate the hidden field with a URL query string (like a UTM string). In other words, you can use hidden fields to submit information with a CTA that the visitor would not submit themselves, and which can help you track related metrics like the effectiveness of your campaigns.


Set Up a Hidden Field with a Fixed Text Value

The general process for creating a hidden field is exactly the same as for any other form field type, and is described in detail here. In this article, we will look only at configuring the options specific to hidden fields.

The simplest way to use hidden fields is to use a fixed text value. You specify a text string of your choice, and the same value gets passed through every time the CTA is submitted.

  1. Open the CTA Editor for the Form CTA on which you want to use hidden fields and open the Manage Fields menu (Form CTA Editor > Layout > Form Fields > Manage).
  2. Add a new field, and begin by using the Search box to locate the field in your MAP where you want to send the value from the hidden field. When you have the field you want, click on Apply. In the example below, we've chosen the Persona field in HubSpot to pass through a value representing the lead's marketing persona:
  3. If you want, use the Field label box to change the "display name" of this field, or leave it as the default (it'll only be visible to you).
  4. Under Field type, use the dropdown to select Hidden. You'll now see some additional options appear:
  5. Type the value you want to pass to your MAP into the Hidden value field. This is the value that will be sent to the MAP field you chose every time the CTA is submitted. In the example below, we want to send the value Demand Jenn to the Persona field in the MAP:
  6. Make sure the box next to Allow query string values to populate this field is left unchecked. This is used if you want to use a query string value instead of a fixed text value (see below).
  7. Click on Save to save your new hidden form field. Back in the Form CTA Editor, don't forget to check the box next to the field under the Form Fields section of the Layout tab, as it will be unchecked by default right after you add it:
  8. That's it! The fixed value will now automatically be passed to your MAP when a visitor submits this Form CTA.


Set Up a Hidden Field with a Query String Value

If you use query string parameters (e.g. UTM strings or by adding lead source information to URLs), you can choose to automatically populate hidden fields with these strings. Doing this will dynamically place a specified parameter's value into the hidden field.

Note: Parameter Names

To ensure that a Form CTA passes query string parameter values to your MAP correctly, you must use the correct parameter names for your MAP. See this article for more information.

  1. Follow steps 1-4 in the instructions for fixed text values above.
  2. When you see the Hidden value field, make sure to leave it blank. This is important: if you enter something here, this value will be passed through to the MAP, not the query string value you actually want.
  3. Instead, check the box next to Allow query string values to populate this field:
  4. A new Param name field will now appear. This is the parameter in the URL that we will look for to populate the hidden field: if the parameter is found in the URL, its value will be automatically inserted into the hidden field and passed to your MAP. In this example, the parameter we want to take the value from is called Persona:
  5. Click on Save to add the new hidden field, and make sure it's checked under Form Fields in the Form CTA Editor.

You're done — almost. If you want to use this option, you also have to create and use sharing URLs that contain the parameters you are tracking with the hidden fields. These parameters must have the exact same name and structure as what you entered into the Param name field. For instance, here's a URL that would work with the example setup described above:


As you can see, the query string is ?Persona=MarketingMary. Now, imagine that we share that link and a visitor visits it, then submits a CTA that contains the hidden field we set up. Uberflip would see that the parameter matches what was specified in the hidden field setup (Persona), and would take the value (MarketingMary) and insert it into the hidden field.

0 out of 0 found this helpful



Please sign in to leave a comment.