2017 © Pedro Peláez
 

craft-plugin craft-googlerecaptcha

Display Google's new reCaptcha form widget and validate responses.

image

futureactivities/craft-googlerecaptcha

Display Google's new reCaptcha form widget and validate responses.

  • Thursday, September 8, 2016
  • by paul-blundell
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Google reCAPTCHA for Craft CMS

Craft plugin to display Google's new reCaptcha form widget and validate responses., (*1)

Forked

Forked from https://github.com/aberkie/craft-recaptcha, (*2)

Additional features:, (*3)

  • Uses a hook to verify the captcha when saving a user
  • Returns error messages in the same way the account field validation works
  • Composer ready

Install

  1. Upload entire recaptcha directory to craft/plugins on your server.
  2. Navigate to your site's Plugin settings from the Control Panel.
  3. Click Install
  4. Click on the 'reCAPTCHA for Craft' link to enter in your reCAPTCHA site key and secret key. You can get both keys from the Google reCaptcha console.

Usage

Templates

To display a reCAPTCHA widget in any template, use {{craft.recaptcha.render()}}., (*4)

User Registration Form

Just add the widget to the form and make sure the action is users/saveUser. This plugin will listen for the new user and check the recaptcha., (*5)

Verification

To verify a user's input, call the plugin's verify service from your own plugin:, (*6)

$captcha = craft()->request->getPost('g-recaptcha-response');
$verified = craft()->recaptcha_verify->verify($captcha);
if($verified)
{
    //User is a person, not a robot. Go on and process the form!
} else {
    //Uh oh...its a robot. Don't process this form!
}

The Versions

08/09 2016

dev-master

9999999-dev

Display Google's new reCaptcha form widget and validate responses.

  Sources   Download

The Requires

 

08/09 2016

1.0

1.0.0.0

Display Google's new reCaptcha form widget and validate responses.

  Sources   Download

The Requires