Passing Hidden Fields to Pardot Forms

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 iFramed on Your Website

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.

Edit your form and add your hidden field using the Form Wizard's drag and drop form builder.

**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.

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

If you don't want to hardcode a parameter in your iframe source, or the value that's passed to the iframed form is dynamic, you can use a different method to pass the values. See Passing URL Parameters from Browser to iFrame for more information.

Passing Hidden Fields with a Form Placed on a Pardot Landing Page or when Linking Directly to a Form

The following works well if you are linking directly to a form, or 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.

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.

Edit your form and add your hidden field using the Form Wizard's drag and drop form builder.

**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.

Append the Field ID as a link parameter to the end of your landing page URL and also insert the value. For example http://www2.site.com/l/1/2007-06-27/101?form_submitted=whitepaperform. In this example, form_submitted is the Field ID, and whitepaperform is the value.

This example shows how URL parameters can be used to fill in a hidden field on a form. Note that the 'hidden field' on this form is visible for demonstration purposes.

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.