PHP code example of cyber-duck / silverstripe-recaptcha
1. Go to this page and download the library: Download cyber-duck/silverstripe-recaptcha library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cyber-duck / silverstripe-recaptcha example snippets
use CyberDuck\Recaptcha\Forms\RecaptchaField;
$fields = FieldList::create([
RecaptchaField::create('Recaptcha');
]);
$validator = RequiredFields::create([
'Recaptcha'
]);
use CyberDuck\Recaptcha\Forms\InvisibleRecaptchaField;
$fields = FieldList::create([
InvisibleRecaptchaField::create(
'Recaptcha',
'MemberLoginForm_LoginForm',
'MemberLoginForm_LoginForm_action_doLogin'
);
]);
$validator = RequiredFields::create([
'Recaptcha'
]);