headjam / simple-recaptcha
A Craft plugin that allows the addition of Google's reCAPTCHA v3 to any simple HTML form and verifies server-side.
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
Requires (Dev)
- codeception/codeception: ^3.0
- craftcms/cms: ^3.2.0
- vlucas/phpdotenv: ^3.0
README
Allows the addition of Google's reCAPTCHA V3 to any simple HTML form and verifies server-side. Heavily influenced by Matt West's Craft reCAPTCHA for Google reCAPTCH V2.
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require headjam/simple-recaptcha
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Simple Recaptcha.
Configuring Simple Recaptcha
- Sign up for reCAPTCHA API key.
- Open the Craft admin and go to Settings → Plugins → Simple Recaptcha → Settings.
- Add your
site key
andsecret key
, then save. Alternatively, copy the contents ofsrc/config.php
toconfig/simple-recaptcha.php
and update. - Add the recaptcha template tag to your forms.
Using Simple Recaptcha
To use Simple Recaptcha, add the recaptcha.render tag with the url you are protecting. For example:
{{ craft.recaptcha.render('users/login') }}
Brought to you by Ben Norman