zelenin/yii2-recaptcha-widget Yii2 reCAPTCHA widget

captcharecaptchagoogle

NOT MAINTAINED! DON'T USE!

Yii2 reCAPTCHA widget

Yii2 reCAPTCHA widget.

Installation

Composer

The preferred way to install this extension is through Composer.

Either run

php composer.phar require zelenin/yii2-recaptcha-widget "*"

or add

"zelenin/yii2-recaptcha-widget": "*"

to the require section of your composer.json

Usage

Register a new site.

Add captcha attribute to model:

public $captcha;

public function rules()
{
    return [
        [
            'captcha',
            'Zelenin\yii\widgets\Recaptcha\validators\RecaptchaValidator',
            'secret' => '<your-secret>'
        ]
    ];
}

Add field to view:

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

Info

See reCAPTCHA documentation

Author

Aleksandr Zelenin, e-mail: aleksandr@zelenin.me

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



0.0.1 is the latest of one release



MIT license
Stats
7 github stars & 2 github forks
0 downloads in the last day
79 downloads in the last 30 days
1715 total downloads