PHP code example of webbuilders-group / silverstripe-turnstile
1. Go to this page and download the library: Download webbuilders-group/silverstripe-turnstile 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/ */
webbuilders-group / silverstripe-turnstile example snippets
$form->enableSpamProtection()
->Fields()
->fieldByName('Captcha')
->setTitle('Spam protection')
->setDescription('Your description here');
$form->enableSpamProtection()
->Fields()
->fieldByName('Captcha')
->setAttribute('data-action', 'action')
->setAttribute('data-cdata', 'payload')
->setAttribute('data-callback', 'yourChallengeJSCallback')
->setAttribute('data-expired-callback', 'yourExpiredJSCallback')
->setAttribute('data-error-callback', 'youErrorJSCallback')
->setAttribute('data-tabindex', 0);