Pardot Knowledge Base

Forwarding Data from a Pardot Form Post to a Third-Party

Last Updated: Apr 26, 2016 | Print this Article
It's easy to forward data from a Pardot Form Handler to a third-party URL by enabling data forwarding. Though less straight-forward, this is also possible via Pardot forms placed on your site or on Pardot Landing Pages that use Layout Templates (unfortunately this is not available for Forms on Pardot Landing Pages created using the Landing Page Builder). Note: In order for to post foreign/special characters to Salesforce correctly, your form or landing page template must have the meta tag character set declared as:
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Create a New Layout Template

This is a very specialized form that will need a slightly different layout template from your other forms and landing pages. The modification is very minor and will not affect the look and feel of the form or landing page.
  1. Navigate to Marketing > Forms > Layout Templates.
  2. Take your existing form or landing page layout and Copy it.
Note: If your form resides on a Pardot landing page, make these edits to the landing page layout template. If the form is being iframed onto an external (non-Pardot) page, edit the form's layout template.

Edit the Layout Template's Form Tab

  1. In the Form tab of the layout template, copy the following lines:
  2. Delete them from the layout and paste them back in somewhere outside of the form tag (either before or after it).
  3. Once moved outside of the form tag, your code may start out like the following:
  4. If you need the form to forward to a page outside of the Pardot form iframe, you will also want to add target="_blank"' to the form tag in the layout template:
  5. Save the Layout Template.

Edit Your Existing Form

  1. Click on Marketing in the left navigation.
  2. Click on Forms in the resulting sub-navigation.
  3. Edit your existing form.
  4. Go to Step 3: Look and Feel.
  5. Select your Layout Template created from the previous step. Note: If you are placing the form on a Pardot landing page, you will need to edit the landing page and select your new layout template from the steps above there instead of at the form level.
  6. Go to Step 4: Completion Actions.
  7. Click on the Thank You Content Tab, then click the HTML button in the WYSIWYG editor and add code similar to the following:
  8. Notes:
    • The form's action URL should be replaced with the success location to which you want to send your prospects.
    • You will want to include a value, name, and type for every field you would like to post to the third-party location.
    • The input value would be the same tag that you would use when doing a mail merge. You can find this by clicking on a Prospect Fields in your system and looking at the Field ID.
    • The {html} inside the variable tags serves to HTML escape the content. We recommend using this because if the input contains special HTML characters, it could cut off your form’s data, or cause a submission failure. For example, if a prospect entered I wouldn’t say we’re “ready to buy” yet in a form field, your data would cut off at I wouldn’t say we’re if you didn’t use {html} in your variable tag. You can find out more about HTML escaping your variable tags here.
    • The name value should be the value for the field in the third-party system you're posting to.
    • Custom fields set to 'Record and display multiple responses' cannot be used with this setup, because variable tags are unable to be used for such fields.
  9. Click on the Thank You Code Tab and add the following javascript:
  10. Save your form.

How to post Pardot form data to Salesforce

All of the information above remains the same but you would add one additional line to the Thank You Content for your form to send your OID. Note that your OID should be replaced with your organization's numeric Salesforce Organization ID. You can obtain your Organization ID value within your Salesforce account by going to Setup > Company Profile (under Administration Setup) > Company Information. The retURL value should be replaced with the success location to which you want to send your prospects. You can optionally add a campaign with something like the following: Note that "Campaign Value" should be replaced with Salesforce's numeric value for the campaign value you want to use.

Need more? Start a conversation with other Pardot users in our Success Community