public $reCaptcha;
public function rules()
{
return [
// ...
[['reCaptcha'], \nyx\widgets\recaptcha\ReCaptchaValidator2::className(),
'secret' => 'your secret key', // unnecessary if reСaptcha is already configured
'uncheckedMessage' => 'Please confirm that you are not a bot.'],
];
}
public $reCaptcha;
public function rules()
{
return [
// ...
[['reCaptcha'], \nyx\widgets\recaptcha\ReCaptchaValidator3::className(),
'secret' => 'your secret key', // unnecessary if reСaptcha is already configured
'threshold' => 0.5,
'action' => 'homepage',
],
];
}
<?= $form->field($model, 'reCaptcha')->widget(
\nyx\widgets\recaptcha\ReCaptcha2::className(),
[
'siteKey' => 'your siteKey', // unnecessary is reCaptcha component was set up
]
)
<?= $form->field($model, 'reCaptcha')->widget(
\nyx\widgets\recaptcha\ReCaptcha3::className(),
[
'siteKey' => 'your siteKey', // unnecessary is reCaptcha component was set up
'action' => 'homepage',
]
)
<?= \nyx\widgets\recaptcha\ReCaptcha2::widget([
'name' => 'reCaptcha',
'siteKey' => 'your siteKey', // unnecessary is reCaptcha component was set up
'widgetOptions' => ['class' => 'col-sm-offset-3'],
])
<?= \nyx\widgets\recaptcha\ReCaptcha3::widget([
'name' => 'reCaptcha',
'siteKey' => 'your siteKey', // unnecessary is reCaptcha component was set up
'action' => 'homepage',
'widgetOptions' => ['class' => 'col-sm-offset-3'],
])
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.