Pardot Knowledge Base

Form Handlers: Advanced Topics

Last Updated: Jul 25, 2016 | Print this Article

Disabling Activity Throttling

The internet is a wild and scary place. By default, Pardot has robust spam prevention mechanisms built into its form handlers. While we will capture submitted data every single time, we do have logic in place to prevent such things as rapid double-clicks and multiple form submissions from spawning off too many auto-responder emails and Visitor Activities. For example, if a prospect corrects their first name, a marketer will usually only want the new correct value, and not need to know that the Prospect submitted the form twice to achieve perfection.

However, sometimes you may wish to record a distinct Visitor Activity and/or auto-responder email for each and every form handler submission. In such a case, you can mark the Disable Visitor Activity throttling and send auto-responder emails after every submission box to disable some of the built in spam protection, and generate a distinct Visitor Activity and auto-responder email for all form handler submissions.

Posting data to hidden iframes

In addition to using form handlers to receive form posts, they can also be used to call a semi-hidden iframe with parameters in the URL to pass data from one system to Pardot, all with the context of the prospect’s browser, and thus their cookie. This allows you to send data to Pardot without modifying your current data flow in any way.

Note: You will need the help of a developer or your IT department to implement this form handler method since it involves dynamically inserting values from your form into the iframe via some server-side scripting. How you choose to populate those values in the iframe is entirely up to your IT team or your web developer, but an example is provided.

Below are details about the end-result your IT team or web developer should work toward when populating this iframe code. Here is an example of the code (written in PHP) you would put on the success or thank you page of your form (it can be placed anywhere on this page):
The iframe src attribute is the same URL as for a form post to your form handler (which can be found by clicking “View form handler code”), only it is being called on a thank you page on your site with a one pixel height and width, making it nearly invisible to the prospect. The parameters appended to the src URL in your hidden iframe need to use the same external field names that are used in the form field mapping section of your form handler.

The resulting HTML on your form's success/thank you page should look something like this after a form submission:
<iframe src="" width="1" height="1"></iframe>

For this 1×1 iframe, you will need to select Specific URL rather than Referring URL as the form handler's Success and Error Location fields, and then you can enter any URL except your form’s thank you page. You can use your homepage or any other page. The page at that URL will be loaded into the iframe, but it will not be visible. Additionally, you will want to add some extra Javascript or server-side scripting that only creates the Pardot iframe if the required fields are present. If the required fields are not present, the iframe should not be loaded.

  • Nothing in your current form code will change. The sample code referenced above would only be placed on the success/thank you page of your existing form.
  • If a field is set as required in your form handler, be sure to make sure prospects always enter it (for example, require it in your web site’s form), otherwise the hidden form handler submission will fail.
  • If a prospect does not complete a required form field (or if that form field fails validation: for example, by entering text into a “numbers” form field), the prospect will be redirected to the Error Location with some messaging appended as parameters to the Error Location URL. Those parameters can then be read, either by a server side process or by JavaScript, to then be used to display some error messaging to the prospect. We therefore suggest editing your form fields' error messages to include details that will identify the field(s) producing the error.

Making a dual post to Salesforce

A simple integration allows you make use of Salesforce’s forms for campaign and source tracking as well as Pardot’s micro-level web analytics. See Can I integrate Pardot with Salesforce web2lead forms? for more details.

Adding the Honeypot Field to Your Form

Pardot forms come with built-in spam and bot protection, including the honeypot method. You can now add the honeypot field to your form handlers! You will want to add this code to the form you are building: If a bot populates this hidden field, Pardot will not collect or forward the submitted data.

Not what you're looking for? Check out these related articles:
Form Handler Overview
Creating Form Handlers
Mapping Fields in Form Handlers
Integrating Form Handlers with Your Forms

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