Skip to content
SilverStripe honey pot capture
PHP Scheme
Branch: master
Clone or download
Pull request Compare This branch is 1 commit behind camspiers:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
code
.php_cs
README.md Completed basic SilverStripe 4 upgrade of package. Aug 13, 2019
_config.php FEATURE: Initial import. Honey pot field Sep 10, 2012
composer.json

README.md

SilverStripe Honey Pot

A SilverStripe 4.x compatible version of camspiers/honeypot

Installation (with composer)

$ composer require heyday/silverstripe-honeypot

Set the default spam protector in app/_config/spamprotection.yml

---
name: spamprotection
---
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
  default_spam_protector: Heyday\SilverStripe\HoneyPot\HoneyPotSpamProtector

Or, on a form by form basis

use Heyday\SilverStripe\HoneyPot\HoneyPotField;
use SilverStripe\Forms\Form;
use SilverStripe\Control\Controller;
use SilverStripe\Forms\FieldList;

/**
 * Class SomeForm
 */
class SomeForm extends Form
{
    /**
     * @param Controller $controller
     */
    public function __construct(Controller $controller)
    {
        $fields = new FieldList();
        $fields->push(new HoneyPotField('Website')); // 'Website' here can be any old string
        ...
    }
}
You can’t perform that action at this time.