SilverStripe\SpamProtection\EditableSpamProtectionField
Editable Spam Protecter Field. Used with the User Defined Forms module (if installed) to allow the user to have captcha fields with their custom forms
Synopsis
class EditableSpamProtectionField
extends EditableFormField
{
- // members
- private static string $singular_name = 'Spam Protection Field';
- private static string $plural_name = 'Spam Protection Fields';
- private static string $table_name = 'EditableSpamProtectionField';
- private static array $check_fields = ;
- private static array $db = ;
- protected FormField $formField = NULL;
- // methods
- public void getFormField()
- public EditableSpamProtectionField setFormField()
- protected DataList getCandidateFields()
- public void onBeforeWrite()
- public void getCMSFields()
- public string spamMapValue()
- public void validateField()
- public void getFieldValidationOptions()
- public void getRequired()
- public void getIcon()
- public void showInReports()
Hierarchy
Extends
- SilverStripe\UserForms\Model\EditableFormField
Members
private
- $check_fields
—
array
Fields to include spam detection for - $db
- $plural_name
- $singular_name
- $table_name
protected
- $formField — SilverStripe\Forms\FormField
Methods
protected
- getCandidateFields() — Gets the list of all candidate spam detectable fields on this field's form
public
- getCMSFields() — Used in userforms 3.x and above
- getFieldValidationOptions()
- getFormField()
- getIcon()
- getRequired()
- onBeforeWrite() — Write the spam field mapping values to a serialised DB field
- setFormField()
- showInReports()
- spamMapValue() — Try to retrieve a value for the given spam field map name from the serialised data
- validateField() — Using custom validateField method as Spam Protection Field implementations may have their own error messages and may not be based on the field being required, e.g. Honeypot Field