Pardot Knowledge Base

Preventing Competitors from Accessing Content on Form Submission

Last Updated: Oct 05, 2016 | Print this Article
Whoa there, partner! This is an advanced topic that involves custom script. Troubleshooting custom script is outside of Pardot Support’s scope, so proceed with caution.

You may wish to block competitors from accessing the content you've hidden behind forms, such as white papers or data sheets. By inserting some Javascript into your forms' Thank You Code, you can redirect your competitors to a different page after they submit the form, which will prevent them from accessing and downloading your content.


  1. Navigate to Marketing > Forms.
  2. Either edit an existing form or create a new form.
  3. During Step 4 (Completion Actions) of the Form Wizard, click on the Thank You Code tab.
  4. Copy and paste the following code in the text area field:
    Note: This code will not work if Redirect prospect instead of showing the form's Thank You Content is enabled.
  5. Replace the following content with specified information:
    • - the first competitor's email domain
    • http://loc1 - if the first competitor submits the form, they will be redirect to this website
    • - the second competitor's email domain
    • http://loc2 - the redirect location for the second competitor (may be the same as the first redirect)
    • http://nonCompetitorLocation - where your prospects (non-competitors) will be directed after successful form completion (such a download page for a white paper)
  6. If you're editing an existing form, click Finish to save. If creating a new form, click Next to go to the confirmation page and then click Finish to save.


  • We recommend JavaScript-encoding your variable tags using {js}. This will prevent special characters from breaking your variable tag's output, and prevent arbitrary code from executing.
  • Have more than two competitors you would like to redirect? Simply copy the following line of code after the line with "http://loc2": } else if (email.indexOf("")!=-1){ top.location="http://loc3";
  • This does not cancel the form submission. Completion actions (such as autoresponder emails) will still fire. This code will simply redirect competitors to a different success location than the one regular prospects see after the form is submitted. To prevent competitors from downloading or accessing your content, remember to also avoid linking to it within your form's autoresponder emails.
  • This presumes that competitors will use their work email address while filling out a form on your website. You can block email from ISPs and free email providers by editing your existing email form fields:
    1. When creating your form under Marketing > Forms, select your email prospect field.
    2. Click Edit, and from the Data Format dropdown, select Email not from ISPs and free email providers.
    3. Click Save form field.
    This will require anyone filling out this form to provide a business or organization email address. If you would like to have an email prospect field that would allow people to submit personal email address, you can have two different fields (one with the ISPs and free email addresses blocked and one with valid emails). Please check out our Form Fields article for more information.

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