FormFieldBase (open)
Base class for a form field (typically a question)
Syntax
LOADLIB "mod::publisher/lib/forms/components.whlib";
OBJECTTYPE FormFieldBase
Constructor
Variables
Properties
- PROPERTY conditionname
- PROPERTY dataset
Dataset to put in the field <input> element (only when the field expands to a single input!)
- PROPERTY enabled
Whether this field is enabled
- PROPERTY enabledcondition
- PROPERTY formgroup
- PROPERTY formorder
- PROPERTY groupclasses
- PROPERTY hidetitle
Hide the title for this field
- PROPERTY htmltitle
HTML Title of this field - if set, overrides title
- PROPERTY name
Name of the field
- PROPERTY novalue
- PROPERTY parent
This field's parent field
- PROPERTY qname
- PROPERTY required
Whether this field is required
- PROPERTY requiredcondition
- PROPERTY title
Title of this field
- PROPERTY visible
Whether this field is visible
- PROPERTY visiblecondition
Functions
- OBJECT FUNCTION CreateSubField(STRING type, STRING name, RECORD matchattributes)
Create a subfield
- RECORD ARRAY FUNCTION EnrichWithFormattedResults(RECORD exportoptions, RECORD ARRAY inputvalues)
- OBJECT ARRAY FUNCTION GetChildComponents()
Get child components. Arrays need this to properly handle subfields
- STRING ARRAY FUNCTION GetComponentNames()
- RECORD FUNCTION GetComposableData()
Returns the data for PrepareFormDataForComposer and GetWittyResultdata (ie the fields as avaialble in mails)
- RECORD ARRAY FUNCTION GetExtraMergeFields(RECORD value)
Returns extra merge fields for this field
- RECORD ARRAY FUNCTION GetOptions()
- RECORD FUNCTION GetRenderTree()
- RECORD ARRAY FUNCTION GetResultColumns(RECORD exportoptions)
- RECORD FUNCTION GetStorageValue()
- BOOLEAN FUNCTION IsFrontendVisible()
- BOOLEAN FUNCTION IsNowEnabled()
- BOOLEAN FUNCTION IsNowRequired()
Return true if this field is required, either statically or by its condition
- BOOLEAN FUNCTION IsNowSettable()
Return true if this field is available for setting - its enabled and visible
- BOOLEAN FUNCTION IsNowVisible()
- BOOLEAN FUNCTION IsPartOf(OBJECT comp)
- BOOLEAN FUNCTION IsSet()
Return if this field is set (satisfies any possible 'required' condition). Fields should override this
- MACRO PreInitComponent()
- MACRO RenderField()
Render the field into a group (RenderInGroup). Delegates individual rendering lines to RenderFieldLines
- MACRO RenderFieldContent()
- MACRO RenderFieldLines()
Render the .wh-form__fieldline lines
- MACRO RenderFieldSearchPreview(RECORD previewsettings, OBJECT context)
- MACRO RenderIntoSubField()
- MACRO SetFromStorage(VARIANT value, RECORD ARRAY attachments)
- MACRO UpdateFromJS(VARIANT jsdata)
- MACRO ValidateValue(OBJECT work)
Validate the field, should return errors through AddErrorFor. Fields may override this for more complex checks, but should still invoke the base function