Concept

Form handlers allow you to manage the forms yourself and simply post the data to Pardot. This allows you to do any sort of customization that you would like in terms of the forms look and feel and still have Pardot provide the tracking and error.

Creating a Form Handler

    1. Navigate to Marketing > Forms > Form Handlers > +Add Form Handler
    2. Fill in the desired Name for this form handler.
    3. Add Tags if you want to apply a tag to the form handler.
    4. Select a Campaign from the dropdown menu.
    5. Optionally enable Kiosk/Data Entry Mode to collect form handler data without applying a prospect cookie to the browser. This is very useful in situations where data for multiple prospects is being entered from the same browser (Ex: trade show booth). More details on Kiosk/Data Entry Mode.
    6. If the data from the target form is to be forwarded to another service other than Pardot, check the box labeled Enable data forwarding to success location. This is useful for posting data to both Pardot and a third party database. Once Pardot receives the post, the exact same data post will be transferred to the location specified as the Success Location.
    7. Optionally Disable Visitor Activity throttling and send auto-responder emails after every submission. Only enable this tool for Forms where Prospects are likely to submit a form multiple times within a 4 hour window. Note that enabling this option can result in a high volume of visitor activities and autoresponder emails. Full feature details here.
    8. In the Success Location dropdown, select ‘Specific URL’ or ‘Referring URL.’
      1. We recommend selecting  ‘Referring URL’ if your form is on a page with content that you want your prospect to view again after submitting the form or if you have a javascript heavy page and want to return the prospect to the original form to display new content. If you select the ‘Referring URL’ then you will not need to enter a specific success location.
      2. We recommend selecting ‘Specific URL‘ if you want the visitor to be redirected upon successfully completing the form, OR if you are forwarding the prospect’s data to another database (see #6 above). If you select ‘Specific URL’, you will need to input a URL in the text box. Input the URL of where you want the visitor to be redirected upon successful completion (this is only available for success locations set to a ‘Specific URL’) or the POST URL for the third party database where you are forwarding the prospect’s submitted information.
    9. In the Error Location dropdown, select either ‘Referring URL’ or ‘Specific URL’ as the location where the visitor should be redirected if the form field values are not correct (e.g. incorrect email address or required field is not present).
      1. If you select the ‘Referring URL’ then you cannot enter a specific error location.
      2. If you select the ‘Specific URL‘ then you will need type in the URL of where you want the visitor redirected if the form field values are incorrect. This is only available for error locations set to a ‘Specific URL.’
    10. Optionally add Completion Actions to the form handler. For example choose an Autoresponder email if you would like an email template to be sent to the prospect, or select Email notifications that will be sent to the selected Pardot user(s) and/or prospect’s assigned user upon submission. Completion actions are not retroactive. Full Completion Action details here.
    11. Add fields to the form handler in order to map data submitted in your form to Pardot Prospect Fields.
      1. Press Add Another Field. In the pop up, fill in External Field Name with the exact name of the form field as it appears on your form.
        1. This name is specified by the ‘name=’ attribute of the input tag in the HTML of your original form.
        2. Note: external field names are case sensitive.
      2. Select the Pardot Prospect Field that should be used to record data submitted to this field. 
        1. You also have options under the ‘Basic’ tab to make the field required or change its Data Format.
        2. Under the ‘Advanced’ tab you can set the error message of the field and whether the field should be enabled to ‘Maintain the initial value upon subsequent form submissions’ or not.
      3. Press Save.
    12. For each input field on the target form that will be captured, press Add Another Field and repeat steps 13-14 until you have added all of the fields you wish to include in your form handler.
    13. Press Create form handler to save your new handler.

Note that conditional fields do not work for form handlers as Pardot does not control your form’s code (and therefore behavior) in this case.

Integrating the Form Handler with your Form

  1. To see the HTML code you will need to implement the handler, click on the Name of your newly created form handler in the table.
  2. Click the View form handler code link, which will appear above the form handler’s details.Screen Shot 2014-04-25 at 2.58.14 PM
  3. Then simply change your existing form’s post URL to the URL provided by the form handler code. You’ll find the post URL in your existing form’s source code, beginning with “action=’…’.”Screen Shot 2014-04-29 at 10.02.03 AM

Important Notes

  1. When using a Pardot form handler you can do a browser side post (the usual posting method and way to cookie prospects upon the submission) or through a server side post. When doing a server side post you must enable the Kiosk/Data Entry Mode option on the form handler. This will prevent Pardot from tracking your server as the prospect because no tracking cookie is set when Kiosk/Data Entry Mode is enabled. Please note that server side posts with Kiosk/Data Entry mode will record the form handler submission activity on the prospect’s record but will not be tracked by a Pardot cookie.
  2. If a field is set as required in your form handler, be sure to make sure prospects always enter it, otherwise the form submission will fail.
  3. If a prospect does not complete a required form field (or if that form field fails validation: e.g., by entering text into a “numbers” form field), the form handler will display the error message specified at the form field level in a separate lightbox. We therefore suggest editing your form field‘s error message to include details about the error.
  4. Pardot can auto-fill Country and State on a prospect record based on GeoIP information. The added data is filled in after a form, landing page, or form handler completion by a prospect.
  5. Pardot form handlers can only be integrated with forms using an empty enctype attribute or an enctype of application/x-www-form-urlencoded.  We cannot accept an enctype of multipart/form-data.
  6. If a form handler is deleted (sent to the Recycle Bin) and a prospect attempts to submit a form integrated with it, they will see the following message: “This form has been deactivated and is no longer accepting submissions. Please contact the website administrator if you believe this to be an error.”  Thus, if you are deleting form handlers in Pardot, you will also want to delete or update the forms on your site so they are no longer integrated with the handlers.
  7. If there is a typo in the form handler URL used for your form’s post location and a prospect attempts to submit the form, they will see the following message: “This link is mis-configured. Please contact your site administrator to have it fixed.”
  8. Form handlers will also accept “success_location” and “error_location” as URL parameters on POST, which will override any of the form handler’s stored success or error location settings. This does not overwrite values already recorded in Pardot, they are temporary parameters that only apply to that specific post request. The parameters must be completely encoded and valid URLs, otherwise the form handler will default to the selected “Success” and “Error” locations in your Pardot form handler’s set up.  For example: posting to http://go.pardot.com/l/1/2007-06-27/101?success_location=www.google.com will not work because the “http://” is missing. Also, posting to http://go.pardot.com/l/1/2007-06-27/101?success_location=http://www.google.com will not work because the URL isn’t encoded properly. Posting to http://go.pardot.com/l/1/2007-06-27/101?success_location=http%3A%2F%2Fwww.google.com would work.

Advanced Topic — 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 use case, one can choose to select the “Disable Visitor Activity throttling and send auto-responder emails after every submission” checkbox to disable some of the built in spam protection, and generate a distinct Visitor Activity and auto-responder email for all Form Handler submissions.

Advanced Topic — 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):

<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$zip = $_POST['zip'];

echo '<iframe src="http://www2.site.com/l/123/2009-04-28/ABCDE?first_name='.$first_name.'&last_name='.$last_name.'&email='.$email.'&company='.$company.'&phone='.$phone.'&zip='.$zip.'" width="1" height="1"></iframe>';

?>

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="http://www2.site.com/l/123/2009-04-28/ABCDE?first_name=John&last_name=Smith&email=john_smith@xyz.com&company=XYZ&phone=1234567890&zip=12345" 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.

Notes:
1. 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.
2. If a field is set as required in your form handler, be sure to make sure prospects always enter it (e.g. require it in your web site’s form), otherwise the hidden form handler submission will fail.
3. If a prospect does not complete a required form field (or if that form field fails validation: e.g., 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.

Advanced Topic — Making a dual post to salesforce.com

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

Advanced Topic — 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:

<div style="position:absolute; left:-9999px; top: -9999px;">
    <label for="pardot_extra_field">Comments</label>
    <input type="text" id="pardot_extra_field" name="pardot_extra_field">
</div>

If a bot populates this hidden field, Pardot will not collect or forward the submitted data.