Version: current

# Class 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

  Object
  ViewableData implements IteratorAggregate
  DataObject implements DataObjectInterface, i18nEntityProvider
  EditableFormField
  EditableSpamProtectionField

Package: spamprotection
Located at spamprotection/code/EditableSpamProtectionField.php

## Methods summary

`public` | # `onBeforeWrite( )` Event handler called before writing to the database. You can overload this to clean up or otherwise process data before writing it to the database. Don't forget to call parent::onBeforeWrite(), though! Event handler called before writing to the database. You can overload this to clean up or otherwise process data before writing it to the database. Don't forget to call parent::onBeforeWrite(), though! This called after $this->validate(), so you can be sure that your data is valid. #### Uses ``DataObjectDecorator::onBeforeWrite()`` #### Overrides `DataObject::onBeforeWrite`
`public `FieldSet`` | # `getFieldConfiguration( )` Implement custom field Configuration on this field. Includes such things as settings and options of a given editable form field Implement custom field Configuration on this field. Includes such things as settings and options of a given editable form field #### Returns ``FieldSet`` FieldSet #### Overrides `EditableFormField::getFieldConfiguration`
`public `FieldSet`` | # `getFieldValidationOptions( )` Append custom validation fields to the default 'Validation' section in the editable options view Append custom validation fields to the default 'Validation' section in the editable options view #### Returns ``FieldSet`` FieldSet #### Overrides `EditableFormField::getFieldValidationOptions`
`public `FormField`` | # `getFormField( )` Return a FormField to appear on the front end. Implement on your subclass Return a FormField to appear on the front end. Implement on your subclass #### Returns ``FormField`` FormField #### Overrides `EditableFormField::getFormField`
`public` | # `Icon( )`
`public boolean` | # `showInReports( )` Show this form field (and its related value) in the reports and in emails. Show this form field (and its related value) in the reports and in emails. #### Returns `boolean` bool #### Overrides `EditableFormField::showInReports`

### Methods inherited from EditableFormField

`CustomRules()`, `Dependencies()`, `EditSegment()`, `TitleField()`, `canCreate()`, `canDelete()`, `canEdit()`, `doDeleteFromStage()`, `doPublish()`, `getErrorMessage()`, `getFieldName()`, `getHasAddableOptions()`, `getIcon()`, `getSetting()`, `getSettingName()`, `getSettings()`, `getShowOnLoad()`, `getSubmittedFormField()`, `getTitle()`, `getValidation()`, `get_possible_autocompletes()`, `isReadonly()`, `populateFromPostData()`, `setAllowedCss()`, `setReadonly()`, `setSetting()`, `setSettings()`, `showExtraOptions()`

### Methods inherited from DataObject

`Aggregate()`, `RelationshipAggregate()`, `__construct()`, `baseTable()`, `belongs_to()`, `buildDataObjectSet()`, `buildSQL()`, `can()`, `canView()`, `castedUpdate()`, `composite_fields()`, `context_obj()`, `customDatabaseFields()`, `custom_database_fields()`, `data()`, `databaseFields()`, `databaseIndexes()`, `database_extensions()`, `database_fields()`, `db()`, `dbObject()`, `debug()`, `defaultSearchFilters()`, `defineMethods()`, `delete()`, `delete_by_id()`, `destroy()`, `disableCMSFieldsExtensions()`, `disable_subclass_access()`, `duplicate()`, `enableCMSFieldsExtensions()`, `enable_subclass_access()`, `exists()`, `extendedSQL()`, `fieldLabel()`, `fieldLabels()`, `flushCache()`, `flush_and_destroy_cache()`, `forceChange()`, `get()`, `getAllFields()`, `getCMSActions()`, `getCMSFields()`, `getChangedFields()`, `getClassAncestry()`, `getComponent()`, `getComponents()`, `getComponentsQuery()`, `getDefaultSearchContext()`, `getField()`, `getFrontEndFields()`, `getManyManyComponents()`, `getManyManyComponentsQuery()`, `getManyManyFilter()`, `getManyManyJoin()`, `getRemoteJoinField()`, `getReverseAssociation()`, `get_by_id()`, `get_one()`, `get_validation_enabled()`, `hasDatabaseField()`, `hasField()`, `hasOwnTableDatabaseField()`, `hasValue()`, `has_many()`, `has_one()`, `has_own_table()`, `i18n_plural_name()`, `i18n_singular_name()`, `inheritedDatabaseFields()`, `instance_get()`, `instance_get_one()`, `isChanged()`, `isEmpty()`, `isInDB()`, `is_composite_field()`, `many_many()`, `many_many_extraFields()`, `merge()`, `newClassInstance()`, `onAfterDelete()`, `onAfterWrite()`, `onBeforeDelete()`, `plural_name()`, `populateDefaults()`, `provideI18nEntities()`, `relObject()`, `requireDefaultRecords()`, `requireTable()`, `reset()`, `scaffoldFormFields()`, `scaffoldSearchFields()`, `searchableFields()`, `setCastedField()`, `setClassName()`, `setComponent()`, `setField()`, `set_context_obj()`, `set_validation_enabled()`, `singular_name()`, `summaryFields()`, `toMap()`, `update()`, `validate()`, `write()`, `writeComponents()`, `writeWithoutVersion()`

### Methods inherited from ViewableData

`ATT_val()`, `BaseHref()`, `CSSClasses()`, `ColumnBreak()`, `ColumnCalc()`, `ColumnNumber()`, `ColumnPad()`, `ColumnPos()`, `CurrentMember()`, `CurrentPage()`, `Debug()`, `Even()`, `EvenOdd()`, `First()`, `FirstLast()`, `HasPerm()`, `IsAjax()`, `JS_val()`, `Last()`, `Me()`, `Middle()`, `MiddleString()`, `Modulus()`, `MultipleOf()`, `Odd()`, `Pos()`, `RAW_val()`, `SQL_val()`, `ThemeDir()`, `ThemeName()`, `Top()`, `TotalItems()`, `XML_val()`, `__get()`, `__isset()`, `__set()`, `buildCastingCache()`, `cachedCall()`, `castingClass()`, `castingHelper()`, `castingHelperPair()`, `castingObjectCreator()`, `castingObjectCreatorPair()`, `customise()`, `escapeTypeForField()`, `getIterator()`, `getSecurityID()`, `getXMLValues()`, `i18nLocale()`, `iteratorProperties()`, `obj()`, `renderWith()`, `setCustomisedObj()`

### Methods inherited from Object

`__call()`, `__toString()`, `__wakeup()`, `addMethodsFrom()`, `addStaticVars()`, `addWrapperMethod()`, `add_extension()`, `add_static_var()`, `allMethodNames()`, `cacheToFile()`, `cacheToFileWithArgs()`, `clearCache()`, `combined_static()`, `create()`, `createMethod()`, `create_from_string()`, `extInstance()`, `extend()`, `getCustomClass()`, `getExtensionInstance()`, `getExtensionInstances()`, `get_extensions()`, `get_static()`, `hasExtension()`, `hasMethod()`, `has_extension()`, `invokeWithExtensions()`, `is_a()`, `loadCache()`, `parentClass()`, `parse_class_spec()`, `remove_extension()`, `sanitiseCachename()`, `saveCache()`, `set_stat()`, `set_static()`, `set_uninherited()`, `stat()`, `strong_create()`, `uninherited()`, `uninherited_static()`, `useCustomClass()`

### Magic methods summary

## Properties summary

`public static string` | $singular_name | # Human-readable singular name. Human-readable singular name.
`public static string` | $plural_name | # Human-readable pluaral name Human-readable pluaral name

### Properties inherited from EditableFormField

`$allowed_css`, `$db`, `$default_sort`, `$extensions`, `$has_one`, `$readonly`

### Properties inherited from DataObject

`$allowed_actions`, `$ancestry`, `$api_access`, `$belongs_many_many`, `$belongs_to`, `$brokenOnDelete`, `$brokenOnWrite`, `$cache_get_one`, `$cache_has_own_table`, `$cache_has_own_table_field`, `$casting`, `$componentCache`, `$components`, `$create_table_options`, `$default_records`, `$defaults`, `$destroyed`, `$field_labels`, `$has_many`, `$indexes`, `$many_many`, `$many_many_extraFields`, `$original`, `$record`, `$searchable_fields`, `$summary_fields`

### Properties inherited from ViewableData

`$customisedObject`, `$default_cast`, `$failover`, `$iteratorPos`, `$iteratorTotalItems`

### Properties inherited from Object

`$class`, `$extension_instances`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -