Need help? You’ve come to the right place

What’s New Getting Started Building Integrating Publishing

Hidden form fields and pre-population

Last Updated

Hidden form fields give you another layer of customization to use with your integration.


Access hidden form fields

Hover over any form widget on your page or pop-up and click Edit Integrations to access its settings, which will appear in the left-hand sidebar.

NOTE: If you don’t yet have a form to use, you can add a form widget to your page, or create a pop-up—which includes a form widget by default.

Creating hidden fields

You can create hidden fields in two ways. 

Inside email service providers

Some email service providers (ESP) will allow you to create or define hidden fields. In the example below, “Source” was set up as hidden within Mailchimp.

NOTE: In order for hidden fields from some ESPs to appear in Leadpages, they must have a pre-defined default value. Please check with the service you use for full details on creating hidden fields in their system.

Inside Leadpages

To hide a field manually from within Leadpages:

  1. Under ② FIELDS in the form settings, click the field you'd like to hide to open its options.
  2. Then, check the "This is a hidden field" checkbox, enter a default value and click Done.
    You can choose any default value the field supports, which will be submitted alongside information your visitor provides.

NOTE: If you choose to hide the email field from your form, a valid email address must be entered as the default value for that hidden field.

Pre-populating hidden fields

Each hidden field created in Leadpages must have a default value, but you can also dynamically pass values to Leadpages from a URL parameter (such as one provided by your email service provider or ad software).

For instance, our page might be at a URL from an ad that includes a variable like so: In this case, we’d put ad_campaign as our URL variable (without the question mark).

When someone opts into the page on that URL, the hidden field would be populated with “facebook” so we could track which ad campaign our opt-in came from.


  1. Return to your form’s email field settings (using the steps above).
  2. Enter a URL variable (also referred to as a query string or UTM parameter) to use for pre-population. It’s best to choose a simple, intuitive variable. Your variable can contain a hyphen (-) or underscore (_), but other special characters may cause issues.
  3. Save your field settings.
  4. Set up a link that dynamically includes your variable—for example, if someone was linking to this page from an email they sent to their subscribers where they already have their email address and would like to hide that field and pre-populate it.

Using UTM parameters

Leadpages blocks parameters with the prefix utm_ from being forwarded into the URL of a form inside a page. This is in order to not skew Google Analytics. While we block the parameters from being added to the URL of a pop-up, we do not block them outright.

As such, it is possible to use parameters containing the utm_ prefix and they will be tracked as expected within Google Analytics.

If you want to pass URL parameters from a page into a pop-up so that they are sent through to an integration – like Drip or Mailchimp – you’ll need to create parameters that do not include the prefix utm_.

For example, if the parameters utm_source=leadpage & utm_medium=email were used, these will function and tell Google Analytics that someone has visited the intended page via the URL. If you wanted to track this data in Mailchimp, you would need to create fields inside of Mailchimp called Lead Source and Lead Medium, configure them as hidden fields inside of your pop-up, and then configure their URL mapping to equal lead_source and lead_medum, respectively.

When sending out that URL for an ad or email to access the page, both the Google Analytics parameters and the parameters to be passed to Mailchimp would be used, as seen in the example below.

When someone visits the page, Google Analytics will track the session appropriately, and if they opt-in, the source for where they came from will be stored within Mailchimp.

Need more help?

You can always get in touch with our support team—just click Support in your Leadpages navigation menu, or submit a ticket ↗

Was this article helpful?
Powered by Zendesk