webfox/silverstripe-formprotection-honeypot

This package is abandoned and no longer maintained. No replacement package was suggested.

Honeypot spam protection for SilverStripe forms.

dev-master 2016-03-29 23:03 UTC

This package is not auto-updated.

Last update: 2022-10-14 02:51:18 UTC


README

Quickly add Honeypot spam protection for SilverStripe forms.

Composer

Run the following to add this module as a requirement and install it via composer.

#!bash

composer require "webfox/silverstripe-formprotection-honeypot:dev-master"

Usage

Include

#!php

use Webfox\SilverStripe\FormProtection\Honeypot\FormField\HoneypotField;

where the form is being created then attach the honey pot field to the form. For example:

#!php

$fields = new FieldList(
            TextField::create('Name'),
            EmailField::create('Email'),
            HoneypotField::create('Protection')
);

or

#!php
 $fields = new FieldList(
            new TextField('Name'),
            new EmailField('Email'),
       	    new HoneypotField('Protection')
);