Join subscribers on our YouTube channel and enjoy other Divi video tutorials!
1. Install The Divi Contact Form Helper Plugin
The first step to set up a honeypot field in the Divi Contact Form module is to install the Divi Contact Form Helper plugin. Regular readers of my weekly blog posts will know that normally I can give a snippet of code to solve almost any problem in Divi. But for this, it simply is not possible and will require a plugin. The good news is that many of you are already using this plugin, and if you are not, then what are you waiting for? This plugin adds tons of settings and features directly to the existing Contact Form module, and honeypot spam protection is one of them. As of version 1.4 we have (76) custom features!
2. Enable The Honeypot Setting
Open the Divi Contact Form module settings and scroll down to the “Spam Protection” settings group toggle. We have added our new custom feature here called “Use Honeypot”. Enabling the setting will add an invisible honeypot field to prevent bots from completing the form.
How Does It Work?
Enabling the setting adds a secret hidden field to the form. Users will never see this, but it looks like a tempting sweet treat to robots. When the robot scans the form fields to autocomplete them, it doesn’t realize that it just triggered the special field value to on, which means our plugin confirms it is a fake. Our plugin code then disables the admin email from sending, and does not allow the entry to save into the database. To the bot, it thinks the form submitted like normal, but in reality nothing happened. This is where we say “gotcha!” As the site owner or admin, you can be happy because you won’t be bothered by deleting those annoying spam bot messages. (Keep in mind, this feature is not about user spam, but only about robot spam.)