The Honeypot Module

Drupal's Honeypot module is of normal difficulty to install and configure

https://www.drupal.org/project/honeypot

Credit & Thanks

Thank you to:

SEO Training Camp
https://www.drupal.org/docs/contributed-modules/honeypot

About the Honeypot Module

No one likes getting those annoying spam-bot submissions via their website’s online forms. It’s a waste of site resources that could be better used by visitors to your site. That’s why we’ve included Drupal's Honeypot module in our list.

The honeypot and timestamp methods have historically been effective ways of eliminating spam-bot submissions in online forms. The Honeypot module combines both methods into a single module that will work with all web forms on your Drupal site.

Install and Enable the Honeypot Module

  1. Install the Honeypot module on your server. (See this section for more instructions on installing modules.)
     
  2. Go to the Extend page: Click Extend (Coffee: “extend”) or visit https://yourDrupal8site.dev/admin/modules in your browser.

    drupal honeypot module installation
     
  3. Select the checkbox next to “Honeypot” and click the Install button at the bottom of the page.

If necessary, give yourself permissions to use the Honeypot module.

  1. Click People > Permissions (Coffee: “perm”) or visit https://yourDrupal8site.dev/admin/people/permissions.

    drupal honeypot module permissions
     
  2. Select only the Administer Honeypot checkbox.
     
  3. Click the Save permissions button at the bottom of the page.

Configure the Honeypot module

  1. Go to the Honeypot module admin page by clicking Configuration > Content Authoring > Honeypot Configuration (Coffee: “honeypot”) or visit https://yourDrupal8site.dev/admin/config/content/honeypot in your browser.

    drupal honeypot module configuration
     
  2. Select the Protect all forms with Honeypot checkbox.
     
  3. Select the Log blocked form submissions checkbox.
     
  4. Change the Honeypot element name to "mobile". This name could be anything, but you want it to look more like a valid field name.
     
  5. Set the Honeypot time limit to 5.
     
  6. Click the Save configuration button at the bottom of the page.

Adjust Honeypot settings within Webform module (optional)

If you’re using the Webform module, you’ll need to make a slight adjustment to the default settings.

  1. Go to the Webform module admin page by clicking Structure > Webform (Coffee: “webforms”) or visit https://yourDrupal8site.dev/admin/structure/webform in your browser.
     
  2. Click on the Configuration tab across the top.
     
  3. Scroll to the Third Party Settings section.

    drupal honeypot module configuration third party settings
     
  4. In the Honeypot section, make sure that Protect all webforms with Honeypot checkbox is selected.
     
  5. Leave the Add time restriction to all webforms checkbox unchecked.
     

    Note: We recommend selecting the time restriction setting on a form by form basis. When it is enabled, it  prevents the page on which the form displays will not be cached, and can impact the overall speed of your website if you have a form on every page of your site.

     
  6. Click the Save configuration button.

Using Honeypot within a Webform

After installation, the Honeypot module settings are now available on a form by form basis.

  1. Go to the Webform listing on our site by clicking Structure > Webforms (coffee: “webforms”) or visit https://yourDrupal8site.dev/admin/structure/webform in your browser.

    drupal honeypot module with web forms
     
  2. Click the Title of the form you would like to edit. This will take you to the form’s page.

    drupal honeypot module webform example
     
  3. Click on the Settings tab. This will take you to that form’s settings under the General sub-tab.

    drupal honeypot module webform settings
     
  4. Scroll down to the Third Party Settings section (normally at the bottom of the page).

    drupal honeypot module webform third party settings
     
  5. Make any changes to the settings and click the Save button at the bottom of the page.
     
  6. Repeat steps 1-5 for each form that needs additional spam protection.
     

WARNING
Enabling the Add time restriction to <formname> webform setting will prevent the page on which that form displays from being cached, which will impact the load time of that page. A form that is on every page of your site should not have this setting enabled.

 

Did you like this walk-through of Drupals' Honeypot Module?
Please tell your friends about it!

twiter social icon linkedin social icon pinterest social icon