SilverStripe\UserForms\Model\EditableFormField\EditableFormHeading
Allows an editor to insert a generic heading into a field
Synopsis
class EditableFormHeading
extends EditableFormField
{
- // members
- private static string $singular_name = 'Heading';
- private static string $plural_name = 'Headings';
- private static boolean $literal = true;
- private static array $db = ;
- private static array $defaults = ;
- private static string $table_name = 'EditableFormHeading';
- // Inherited members from EditableFormField
- public static array $allowed_css;
- protected bool $readonly;
- protected string $jsEventHandler;
- // methods
- public FieldList getCMSFields()
- public void getFormField()
- protected void updateFormField()
- public void showInReports()
- public void getFieldValidationOptions()
- public void getSelectorHolder()
- public void getSelectorOnly()
- public void getLevel()
- // Inherited methods from EditableFormField
- public string getJsEventHandler()
- public $this setReadonly()
- public FieldList getCMSFields()
- public void requireDefaultRecords()
- protected FieldList getDisplayRuleFields()
- public void onBeforeWrite()
- protected string generateName()
- public bool getSetsOwnError()
- public bool canDelete()
- public bool canEdit()
- public bool canView()
- public bool canCreate()
- protected SiteTree getCanCreateContext()
- public void isNew()
- public void setAllowedCss()
- public string getIcon()
- public bool getHasAddableOptions()
- public bool showExtraOptions()
- public string getEscapedTitle()
- public string getFieldNumber()
- public void getCMSTitle()
- public FieldList getFieldValidationOptions()
- public FormField getFormField()
- public void doUpdateFormField()
- protected void updateFormField()
- public SubmittedFormField getSubmittedFormField()
- public bool showInReports()
- public Varchar getErrorMessage()
- public FormField getInlineClassnameField()
- public FormField getInlineTitleField()
- public string getSelectorHolder()
- public string getSelectorOnly()
- public string getSelectorField()
- public string getSelectorFieldOnly()
- public array getEditableFieldClasses()
- public Validator getCMSValidator()
- public SS_List EffectiveDisplayRules()
- public array|null formatDisplayRules()
- public string DisplayRulesConjunctionNice()
- public string ShowOnLoadNice()
- public bool isCheckBoxField()
- public bool isRadioField()
- public bool isCheckBoxGroupField()
Hierarchy
Members
private
- $db
- $defaults
- $literal
- $plural_name
- $singular_name
- $table_name
protected
- $jsEventHandler
—
string
Property holds the JS event which gets fired for this type of element - $readonly — SilverStripe\UserForms\Model\bool
public
- $allowed_css
—
array
A list of CSS classes that can be added
Methods
protected
public
- getCMSFields()
- getFieldValidationOptions()
- getFormField()
- getLevel()
- getSelectorHolder()
- getSelectorOnly()
- showInReports()
Inherited from SilverStripe\UserForms\Model\EditableFormField
protected
- generateName() — Generate a new non-conflicting Name value
- getCanCreateContext() — Helper method to check the parent for this object
- getDisplayRuleFields() — Return fields to display on the 'Display Rules' tab
- updateFormField() — Updates a formfield with the additional metadata specified by this field
public
- DisplayRulesConjunctionNice() — Replaces the set DisplayRulesConjunction with their JS logical operators
- EffectiveDisplayRules() — Determine effective display rules for this field.
- ShowOnLoadNice() — Replaces boolean ShowOnLoad with its JS string equivalent
- canCreate() — Return whether a user can create an object of this type
- canDelete() — Return whether a user can delete this form field based on whether they can edit the page
- canEdit() — Return whether a user can edit this form field based on whether they can edit the page
- canView() — Return whether a user can view this form field based on whether they can view the page, regardless of the ReadOnly status of the field
- doUpdateFormField() — Updates a formfield with extensions
- formatDisplayRules() — Extracts info from DisplayRules into array so UserDefinedForm->buildWatchJS can run through it.
- getCMSFields()
- getCMSTitle()
- getCMSValidator()
- getEditableFieldClasses() — Get the list of classes that can be selected and used as data-values
- getErrorMessage() — Return the error message for this field. Either uses the custom one (if provided) or the default SilverStripe message
- getEscapedTitle() — Returns the Title for rendering in the front-end (with XML values escaped)
- getFieldNumber() — Find the numeric indicator (1.1.2) that represents it's nesting value
- getFieldValidationOptions() — Append custom validation fields to the default 'Validation' section in the editable options view
- getFormField() — Return a FormField to appear on the front end. Implement on your subclass.
- getHasAddableOptions() — Return whether or not this field has addable options such as a dropdown field or radio set
- getIcon() — Get the path to the icon for this field type, relative to the site root.
- getInlineClassnameField() — Get the formfield to use when editing this inline in gridfield
- getInlineTitleField() — Get the formfield to use when editing the title inline
- getJsEventHandler() — Returns the jsEventHandler property for the current object. Bearing in mind it could've been overridden.
- getSelectorField() — Gets the JS expression for selecting the value for this field
- getSelectorFieldOnly()
- getSelectorHolder() — Get the JS expression for selecting the holder for this field
- getSelectorOnly() — Returns only the JS identifier of a string, less the $(), which can be inserted elsewhere, for example when you want to perform selections on multiple selectors
- getSetsOwnError() — Flag indicating that this field will set its own error message via data-msg='' attributes
- getSubmittedFormField() — Return the instance of the submission field class
- isCheckBoxField() — Returns whether this is of type EditableCheckBoxField
- isCheckBoxGroupField() — Determined is this is of type EditableCheckboxGroupField
- isNew() — checks whether record is new, copied from SiteTree
- isRadioField() — Returns whether this is of type EditableRadioField
- onBeforeWrite()
- requireDefaultRecords()
- setAllowedCss() — Set the allowed css classes for the extraClass custom setting
- setReadonly() — Set the visibility of an individual form field
- showExtraOptions() — Return whether or not this field needs to show the extra options dropdown list
- showInReports() — Show this form field (and its related value) in the reports and in emails.