jbennecker/silverstripe-honeypotprotection

Installs: 1 158

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 1

Open Issues: 1

Type:silverstripe-vendormodule

1.0.5 2021-10-07 13:14 UTC

This package is auto-updated.

Last update: 2024-12-08 14:11:55 UTC


README

This module works by adding a normal text field which is visually hidden. The field is invalid when it's not empty. Bot will likely fill out the field, because they don't process css.

Requirements

Install

Install via composer.

composer require jbennecker/silverstripe-honeypotprotection

Set the default spam protector in a .yml config file of your choice.

SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
  default_spam_protector: jbennecker\HoneypotProtection\HoneypotProtector

Usage

In custom forms add the field like this

use jbennecker\HoneypotProtection\HoneypotProtectorField;

....

$fields = new FieldList(
    ....
    HoneypotProtectorField::create('Phone') // Change title accordingly
)

For userforms simply add a spamprotector-field.