‹ Back to Knowledge Base home

Occasionally you may want to pass data as a hidden field to Pardot. For example, you may have a product information form and you want to pass the product name as a hidden field based on the page from which your prospect reached the form.

Passing Hidden Fields with a Form Handler

Simply set up a form handler and map the input name of your hidden field to the appropriate Pardot field and the data will pass through just like any other field during the post.

Passing Hidden Fields with a Form Placed on Your Website

  1. Create a Pardot custom field with the Type “Hidden.” Note the Field ID of your field, which you’ll need to append to your form URL.
  2. Edit your form and add your hidden field using the Form Wizard’s drag and drop form builder.
  3. **IMPORTANT**: Make sure that you check the setting on the hidden field to “Always display even if previously completed” (under the advanced tab when editing your field) if you are using this form in more than one place.
  4. Append the Field ID as a link parameter to the end of your iframe URL for each form and also insert the value.

If your iframe URL were:
<iframe src=’http://www2.site.com/l/1/2007-06-27/101′></iframe>

Then your new URL would be:
<iframe src=’http://www2.site.com/l/1/2007-06-27/101?Field_ID=value’></iframe>

The Field_ID is the field ID for your custom field and value is the value you wish to have filled in. This would be different for each form.

For example, if your hidden field is intended to contain the name of the completed form, it may read:
http://www2.site.com/l/1/2007-06-27/101?form_submitted=whitepaperform

Passing Hidden Fields with a Form Placed on a Pardot Landing Page

The following works well if you are using one form on multiple Pardot landing pages and need to pass a different hidden value through the form depending on the page. If you only need to pass a hidden value through one form which is hosted on a Pardot landing page, you could add a completion action to the form that adds a specific value to the Custom Field you designate. Using a completion action frees you from having to set up the following steps.

  1. Create a Pardot custom field with the Type “Hidden.” Note the Field ID of your field, which you’ll need to append to your landing page URL.
  2. Edit your form and add your hidden field using the Form Wizard’s drag and drop form builder.
  3. **IMPORTANT**: Make sure that you check the setting on the hidden field to “Always display even if previously completed” (under the advanced tab when editing your field) if you are using this form in more than one place.
  4. Append the Field ID as a link parameter to the end of your landing page URL and also insert the value.

Notes

You can also create hidden versions of your form fields rather than creating hidden custom fields to include in your forms. For example, you can use the default field “Source” on your form, edit the form field to be “hidden”, and pass a value to this field on your form. If you are using a standard form field instead of a custom one, you will use the field’s Prospect Field value rather than the Field ID in your URL.

You may need to encode spaces and other characters within your URL. Here are instructions for this.

Not what you’re looking for? Check out these other articles:
Passing URL Parameters from Browser to iframe
Populate Hidden Field on Form with Name of Webpage
Advanced Form Topics 
Google Analytics Connector