Sunnysideup\SimplestSpam\Form\InvisibleSpamField
Provides an {@link FormField} which allows form to validate for non-bot submissions by giving them a honey pot
Synopsis
class InvisibleSpamField
extends EditableSpamProtectionField
{
- // members
- private static string $table_name = 'InvisibleSpamField';
- private static array $definitions = ;
- private static integer $min_seconds_completing_form = 10;
- private static integer $max_seconds_completing_form = 600;
- private static array $css_rules = ;
- // methods
- protected String labelUsed()
- protected String fieldNameUsed()
- protected String classNameUsed()
- public String FieldHolder()
- public String Field()
- public void setFieldMapping()
- public void validate()
- protected void createValidationMessage()
- protected void initialise()
- protected String usedField()
Hierarchy
Extends
- SilverStripe\SpamProtection\EditableSpamProtectionField
Members
private
-
$css_rules
also consider: height: 0px; overflow: hidden; etc... -
$definitions
list of fields that can be placed as honey pots you can add your own one here... -
$max_seconds_completing_form
maximum number of seconds for a user to complete a form set to zero to ignore -
$min_seconds_completing_form
minimum number of seconds for a user to complete a form set to zero to ignore - $table_name
Methods
protected
- classNameUsed() — class name used
- createValidationMessage()
- fieldNameUsed() — returns the field name being used
- initialise()
- labelUsed() — returns the label being used
- usedField() — returns the key of the field to be used...