PHP code example of jbennecker / silverstripe-recaptcha
1. Go to this page and download the library: Download jbennecker/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/ */
jbennecker / silverstripe-recaptcha example snippets
public function HelloForm()
{
$fields = new FieldList(
TextField::create('Name', _t('HelloForm.Name', 'Name')),
TextField::create('Email', _t('HelloForm.Email', 'E-Mail')),
TextareaField::create('Nachricht', _t('HelloForm.Nachricht', 'Nachricht')),
RecaptchaField::create('recaptcha') // <--- add this
);
$actions = new FieldList(
FormAction::create('doSayHello')->setTitle(_t('HelloForm.Submit', 'Senden'))
);
$