How to Build a Spam Free Marketo Form Without Using a Captcha


Keep your Marketo database clean and spam trap free by following this tutorial which uses the honeypot technique instead of a captcha.

What is the honeypot technique?

The honeypot technique is a fast, effective way to prevent spam bots from submitting your forms. Spam bots love form fields and when they encounter a form field they will fill it out, even if it’s hidden from the user interface using CSS. To leverage this, you can create a form field that should be left blank then use CSS to hide it from human users. When the form is submitted you can check to see if there’s a value for the field and block the form submission.

How to implement the honeypot technique in Marketo

Step 1: Create a new field

Create a new field in Marketo called honeypot by going to Admin > Field Management > New Custom Field.


You don’t need to sync this field with your CRM since it will never have a value.

Step 2: Add the field to your form(s)

Now that the honeypot field is created, you will need to add it to each of your Marketo forms.


Make sure the field is not marked as required.

Step 3: Add CSS to your form

Add the following CSS to your form under Form Settings > Form Theme > Edit Custom CSS



Note: This will hide the honeypot field in the form preview mode and on any pages you embed the form. It will NOT hide the form in the Marketo form editor.

Step 4: Add form validation to all landing page templates

Add the following code right before the closing </body> tag in any landing page templates that contain a form.

This code will check if the honeypot field is empty and submit the form. If the honeypot field has a value it will block the form submission. Remember that a spam bot will see the field and fill it out, but a human would not see the form field (it’s hidden using CSS).

Step 5: Test your forms and approve your landing pages

Do a couple test form submissions to make sure you implemented everything correctly and approve your landing pages.

Step 6: Build a Smart List

Some bots are smarter than others and know how to disable javascript on a landing page, therefore the Marketo form will still submit if they have filled out the “honeypot” field, since we’re using javascript to block the submission. It’s still easy to capture these exceptions, though.

Create a smart list called Honeypot Exceptions under lead database and use the filter “Honeypot is not empty”.

This will pull a list of all form fill outs that have a value for the honeypot field (i.e. might be spam), but were about to get into your Marketo database (likely through JS not loading). From here, you can delete these spam contacts manually out of your Marketo database or create a smart campaign to automate the deletion.


Email me, send me a tweet @jennamolby, or leave a comment

Related Posts

  • 21/09/2017
    3 Free Pardot Landing Page Templates for Asset Downloads

    Create beautiful, responsive landing pages in Pardot by using one of these 3 free Pardot layout templates. These landing page templates are designed specifically for gated assets such as white papers and eBooks, but they will work well with any landing page that contains a form.

  • 19/05/2016
    How to Use a Pardot Form to Gate Content on a Page

    In this tutorial you will learn how to use a Pardot form to gate content on a page. Gated content allows you to capture a lead’s information, by asking them to provide contact details before accessing a piece of content that is valuable. Instead of creating more than one page for the gated content and form, this tutorial will focus on creating a popup on the page that contains the asset.

  • 17/05/2016
    Advanced Marketo Form Techniques Part 2

    Customize your Marketo forms even more by using these 3 advanced Marketo form techniques. Learn how to show a thank you message after a form submission, how to limit word count on text fields and how to block free email addresses from form submissions.

10 comment(s)
  • Kate

    12/04/2017 at 10:24 am

    This is a great article, thank you! My one question- when using a free form landing page, will the code work if I enter it in the custom HTML editor? I am not able to see the full code to make sure it's right before the closing section.

    • Jenna Molby
      to Kate

      12/04/2017 at 10:47 am

      Hi Kate, Glad you found the article helpful. Yes, adding an HTML section within the free-form editor should work.

  • Annie

    27/01/2017 at 1:57 pm

    Super awesome and great post! Thank you so much.

  • Diego

    23/01/2017 at 9:05 am

    This is so useful. Thanks for this post.

  • Denise Greenberg

    04/01/2017 at 10:59 am

    This sounds super useful! Thank you! One question - why is it necessary to use custom CSS to hide the field rather than to just make the field type "hidden" on the form?

    • Jenna Molby
      to Denise Greenberg

      04/01/2017 at 12:45 pm

      Hi Denise, great question! Spam bots tend to ignore CSS. For example, if you use CSS to hide a form field (especially via CSS in a separate file), they have a really hard time knowing that the field is not supposed to be visible. If you mark the field type as "hidden" the bot is smart enough to know to ignore it. Hope that helps!

  • Meera

    24/07/2016 at 9:41 pm


Leave A Comment

Your email address will not be published. Required fields are marked *

About Me

Welcome to my blog, where I share, tips, tricks, thoughts and solutions that I learn in my daily life as a sales and marketing professional.


Most Commented
Popular Posts