Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: TemplateField

The field with the form data, contains the value of the nested form. Internal use only.

Implements​

Constructors​

Constructor​

new TemplateField(componentStore, viewerStore): TemplateField

Creates the nested form field with form data for the component.

Parameters​

componentStore​

ComponentStore

the component settings.

viewerStore​

IStore

the form viewer settings.

Returns​

TemplateField

Properties​

componentStore​

readonly componentStore: ComponentStore

the component settings.


touched​

touched: boolean = false

Flag, true, if the field is marked as touched.

Implementation of​

Field.touched


valued​

valued: string = ''

The name of the component property that contains the field value.

Implementation of​

Field.valued


viewerStore​

readonly viewerStore: IStore

the form viewer settings.

Accessors​

errors​

Get Signature​

get errors(): Record<string, unknown>

Contains a field validation errors if the field provides multiple errors (i.e. field is template). Contains an array of field validation errors if the field contains an array of components.

Returns​

Record<string, unknown>

Contains a field validation errors if the field provides multiple errors (i.e. field is template). Contains an array of field validation errors if the field contains an array of components.

Implementation of​

Field.errors


fieldType​

Get Signature​

get fieldType(): FieldType

The field type.

Returns​

FieldType

The field type.

Implementation of​

Field.fieldType


form​

Get Signature​

get form(): ComponentData

Returns​

ComponentData

the form for the field.


storeDataInParentForm​

Get Signature​

get storeDataInParentForm(): any

Flag, false if nested form data show as nested object, true otherwise.

Returns​

any

Flag, false if nested form data show as nested object, true otherwise.

Implementation of​

Field.storeDataInParentForm


value​

Get Signature​

get value(): unknown

Value of the field.

Returns​

unknown

Value of the field.

Implementation of​

Field.value

Methods​

clear()​

clear(): void

Returns​

void

Inherit Doc​

Implementation of​

Field.clear


dispose()​

dispose(): void

Returns​

void

Inherit Doc​

Implementation of​

Field.dispose


getValidationResult()​

getValidationResult(): Promise<undefined>

Returns​

Promise<undefined>

the ValidationMessages validation results.

Implementation of​

Field.getValidationResult


init()​

init(): void

Returns​

void

Inherit Doc​

Implementation of​

Field.init


reset()​

reset(): void

Returns​

void

Inherit Doc​

Implementation of​

Field.reset


setError()​

setError(error): void

Parameters​

error​

unknown

Returns​

void

Inherit Doc​

Implementation of​

Field.setError


setTouched()​

setTouched(): void

Returns​

void

Inherit Doc​

Implementation of​

Field.setTouched


setValue()​

setValue(value): void

Parameters​

value​

unknown

Returns​

void

Inherit Doc​

Implementation of​

Field.setValue


validate()​

validate(): Promise<void>

Returns​

Promise<void>

Inherit Doc​

Implementation of​

Field.validate