PHP Class himiklab\yii2\recaptcha\ReCaptcha

For example: php field($model, 'reCaptcha')->widget( ReCaptcha::className(), ['siteKey' => 'your siteKey'] ) ?> or php 'reCaptcha', 'siteKey' => 'your siteKey', 'widgetOptions' => ['class' => 'col-sm-offset-3'] ]) ?>
See also: https://developers.google.com/recaptcha
Author: HimikLab
Inheritance: extends yii\widgets\InputWidget
Show file Open project: himiklab/yii2-recaptcha-widget Class Usage Examples

Public Properties

Property Type Description
$jsCallback Your JS callback function that's executed when the user submits a successful CAPTCHA response.
$jsExpiredCallback Your JS callback function that's executed when the recaptcha response expires and the user needs to solve a new CAPTCHA.
$secret Your secret.
$siteKey Your sitekey.
$size The size of the widget. [[SIZE_NORMAL]] (default) or [[SIZE_COMPACT]]
$tabindex The tabindex of the widget
$theme The color theme of the widget. [[THEME_LIGHT]] (default) or [[THEME_DARK]]
$type The type of CAPTCHA to serve. [[TYPE_IMAGE]] (default) or [[TYPE_AUDIO]]
$widgetOptions Additional html widget options, such as class.

Public Methods

Method Description
run ( )

Protected Methods

Method Description
customFieldPrepare ( )
getLanguageSuffix ( )

Method Details

customFieldPrepare() protected method

protected customFieldPrepare ( )

getLanguageSuffix() protected method

protected getLanguageSuffix ( )

run() public method

public run ( )

Property Details

$jsCallback public property

Your JS callback function that's executed when the user submits a successful CAPTCHA response.
public $jsCallback

$jsExpiredCallback public property

Your JS callback function that's executed when the recaptcha response expires and the user needs to solve a new CAPTCHA.
public $jsExpiredCallback

$secret public property

Your secret.
public $secret

$siteKey public property

Your sitekey.
public $siteKey

$size public property

The size of the widget. [[SIZE_NORMAL]] (default) or [[SIZE_COMPACT]]
public $size

$tabindex public property

The tabindex of the widget
public $tabindex

$theme public property

The color theme of the widget. [[THEME_LIGHT]] (default) or [[THEME_DARK]]
public $theme

$type public property

The type of CAPTCHA to serve. [[TYPE_IMAGE]] (default) or [[TYPE_AUDIO]]
public $type

$widgetOptions public property

Additional html widget options, such as class.
public $widgetOptions