2017 © Pedro Peláez
 

yii2-extension yii2-recaptcha-widget

Yii2 reCAPTCHA widget

image

gbksoft/yii2-recaptcha-widget

Yii2 reCAPTCHA widget

  • Tuesday, May 24, 2016
  • by gbksoft
  • Repository
  • 2 Watchers
  • 0 Stars
  • 509 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Yii2 reCAPTCHA widget

Yii2 reCAPTCHA widget., (*1)

Installation

Composer

The preferred way to install this extension is through Composer., (*2)

Either run, (*3)

php composer.phar require gbksoft/yii2-recaptcha-widget "*", (*4)

or add, (*5)

"gbksoft/yii2-recaptcha-widget": "*", (*6)

to the require section of your composer.json, (*7)

Usage

Register a new site., (*8)

Add captcha attribute to model:, (*9)

public $captcha;

public function rules()
{
    return [
        [
            'captcha',
            \gbksoft\recaptcha\validators\RecaptchaValidator::class,
            'secret' => '<your-secret>'
        ]
    ];
}

Add field to view:, (*10)

<?= $form->field($model, 'captcha')->widget(\gbksoft\recaptcha\widgets\Recaptcha::class, [
    'clientOptions' => [
        'data-sitekey' => '<your-sitekey>'
    ]
]) ?>

Info

See reCAPTCHA documentation, (*11)

The Versions

24/05 2016

dev-master

9999999-dev

Yii2 reCAPTCHA widget

  Sources   Download

MIT

The Requires

 

yii2 captcha google recaptcha