Magento 2 Honeypot Anti-Spam

Introduction

Magento 2 Honeypot Anti-Spam extension allows you to restrict spambots from submitting your Magento 2 forms. Receives only accurate forms, data entries at your Magento 2 site.

The extension adds a hidden honeypot input field at any of the forms selected/configured from the backend.

The hidden honeypot field (<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none">) is not showing to real visitors/customers/users and can not disbuds/prevent them to fill and submit the form.  However, spammers/bots can see the hidden honeypot field as just another field in the form, and if spammers/bots try to fill that hidden honeypot field (eg. <input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none" value="123">), and click submit, the form will fail to submit.

Installation

The extension has 2 separate ways of installation: via composer and via package upload.

Please follow this Installation Guide to install the extension.

Extension Configuration

Configuration Settings

To configure the extension, log into the Magento 2 Backend and go to STORES ⟶ Configuration ⟶ ULMOD EXTENSIONS ⟶ Honeypot

General

Enable - if "Yes", the extension will be enabled in the frontend

Forms Controller Actions - Specify the action URL of all forms to enable the honeypot. One URL per line.

  • For "Newsletter Subscribe Form" use : newsletter/subscriber/new
  • For "Customer Registration Form" use : customer/account/createpost
  • For "Contact Form" use : contact/index/post
  • For "Prodcut Review Form" use : review/product/post
  • For "Your Custom or Additional Forms": please check your form actions to use, or contact our support team if you need any assistance on it

Forms CSS Selector - Enter a comma-separated list of CSS Selector for the forms (specified in Forms Controller Actions field) to enable the honeypot. Eg. .form.subscribe, .form.form-create-account, .form.contact.

  • For "Newsletter Subscribe Form" use : .form.subscribe
  • For "Customer Registration Form" use : .form.form-create-account
  • For "Contact Form" use : .form.contact
  • For "Prodcut Review Form" use : .review-form
  • For "Your Custom or Additional Forms": please check the CSS selector of your custom/additional forms, or contact our support team if you need any assistance on it

Not Allowed or Restricted Message - Enter the message that will display to users that are not allowed to submit the form (spambots in most of the cases). For Eg "We are sorry, you can not submit this form for now. Our spam blocker tool has detected you as a bot. Please contact our team at [email protected] in case you are not a bot"

Frontend View

In the frontend, Magento 2 Honeypot Anti-Spam extension adds a hidden honeypot input field at any forms selected/configured from the backend.

The hidden honeypot field (<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none">) is not showing to real visitors/customers/users and can not disbuds/prevent them to fill and submit the form. However, spammers/bots can see the hidden field as just another field in the form, and if spammers/bots try to fill that hidden honeypot field, and click submit, the form will fail to submit (the Not Allowed or Restricted Message defined in the backend settings will display).

For example, if you have enabled the honeypot on the contact form page, the extension will add a hidden honeypot input field at the end of the form as follow :

<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none">

1. For Spammers/Bots:

When the hidden honeypot field is filled (mostly by spammers/bots) with any value. eg. value="123"  

<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none" value="123">

 

 

the form will fail to submit, and the Not Allowed or Restricted Message (that was defined in the backend settings)  will display as follow:

 

2. For real Users/Customers/visitors:

When the hidden honeypot field is not filled (mostly by real users/customers/visitors). Eg.

<input type="text" name="ulmod_honeypot" class="ulmod_honeypot" style="display: none">

and that the user/customer/visitor clicks submit, the form will be submitted with success, as follow

Extension Support

Need Help?

Ulmod Support team is always ready to assist you, no matter which part of the world you are in. If something does happen and you think you might be experiencing an issue or bug, please contact us via [email protected] or submit a ticket from our Helpdesk Ticket and we will help you out.

Got Questions?

Should you have any questions or feature suggestions, please Contact Us. Your feedback is welcome!

Extension Product Page