Add a honeypot captcha to your Craft CMS contact form
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fixed PHP error when Contact Form wasn't installed Jul 18, 2018
CHANGELOG.md Fixed PHP error when Contact Form wasn't installed Jul 18, 2018
LICENSE.md License May 16, 2017
README.md Update the install instructions Jul 28, 2018
composer.json added keywords to composer.json Apr 2, 2018

README.md

Contact Form Honeypot plugin for Craft

This plugin allows you to add a honeypot captcha to your Craft CMS contact form.

Requirements

This plugin requires Craft CMS 3.0.0-beta.20 or later, and the Contact Form plugin.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Contact Form Honeypot”. Then click on the “Install” button in its modal window.

With Composer

Open your terminal and run the following commands:

# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require craftcms/contact-form-honeypot

# tell Craft to install the plugin
./craft install/plugin contact-form-honeypot

Setup

To configure the plugin, go to Settings → Contact Form Honeypot, and choose a param name that your honeypot field should have.

Then edit your contact form template(s), and add the honeypot field.

<input id="secretHoneypotParamName" name="secretHoneypotParamName" type="text">

You can hide the field with CSS:

input#secretHoneypotParamName { display: none; }