aem-forms-af-runtime

Interface: FieldModel

Generic field model interface. Defines properties that each form field should have

Hierarchy

Implemented by

Table of contents

Properties

Methods

Properties

:type

Readonly :type: string

Custom widget type show to the user for capturing the data.

Inherited from

BaseModel.:type


_eventSource

_eventSource: EventSource

Inherited from

BaseModel._eventSource


accept

Optional accept: string[]

Inherited from

BaseModel.accept


dataRef

Optional Readonly dataRef: null | string

To map the field’s value to a property in the data model.

Inherited from

BaseModel.dataRef


default

Optional Readonly default: any

Default value of the Field.

Inherited from

BaseModel.default


description

Optional description: string

Extra description to be shown to the user to aid in form filling experience. It can be rich text.

Inherited from

BaseModel.description


displayFormat

Optional Readonly displayFormat: string

format in which user will see the value after update


displayValue

Optional Readonly displayValue: string

value to be displayed to the user after update


displayValueExpression

Optional Readonly displayValueExpression: string

expression that when evaluated returns the displayValue of a field


editFormat

Optional Readonly editFormat: string

format in which user will edit the value


editValue

Optional Readonly editValue: string

value to be displayed to the user for edit


enabled

Optional enabled: boolean

Whether the field is enabled and takes part in rules, events etc.

Inherited from

BaseModel.enabled


enforceEnum

Optional enforceEnum: boolean

Inherited from

BaseModel.enforceEnum


enum

Optional enum: any[]

Inherited from

BaseModel.enum


enumNames

Optional enumNames: string[]

Inherited from

BaseModel.enumNames


events

Optional events: Object

Events is a dictionary of eventName to the actions to perform.

Index signature

▪ [key: string]: string

Inherited from

ScriptableField.events


exclusiveMaximum

Optional exclusiveMaximum: number

Inherited from

BaseModel.exclusiveMaximum


exclusiveMinimum

Optional exclusiveMinimum: number

Inherited from

BaseModel.exclusiveMinimum


fieldType

Readonly fieldType: string

Type of field to capture the user data.

Inherited from

BaseModel.fieldType


format

Optional format: string

Inherited from

BaseModel.format


fragment

Readonly fragment: string

Inherited from

BaseModel.fragment


id

Readonly id: string

Unique id of the form field.

Inherited from

BaseModel.id


index

Readonly index: number

The index of the Field within its parent.

Inherited from

BaseModel.index


isContainer

Readonly isContainer: boolean

Whether the form field is container or not

Inherited from

BaseModel.isContainer


items

Optional Readonly items: (FieldModel | FieldsetModel)[]

Array containing Fields or Panels.

Inherited from

BaseModel.items


label

Optional label: Label

Label to be used for the field.

Inherited from

BaseModel.label


lang

Optional Readonly lang: string

language of the field

Inherited from

BaseModel.lang


maxFileSize

Optional maxFileSize: string | number

Inherited from

BaseModel.maxFileSize


maxItems

Optional maxItems: number

Inherited from

BaseModel.maxItems


maxLength

Optional maxLength: number

Inherited from

BaseModel.maxLength


maxOccur

Optional maxOccur: number

Inherited from

BaseModel.maxOccur


maximum

Optional maximum: number

Inherited from

BaseModel.maximum


minItems

Optional minItems: number

Inherited from

BaseModel.minItems


minLength

Optional minLength: number

Inherited from

BaseModel.minLength


minOccur

Optional minOccur: number

Inherited from

BaseModel.minOccur


minimum

Optional minimum: number

Inherited from

BaseModel.minimum


name

Optional Readonly name: string

Name of the form field.

Inherited from

BaseModel.name


parent

parent: ContainerModel

Parent of the current field

Overrides

BaseModel.parent


pattern

Optional pattern: string

Inherited from

BaseModel.pattern


placeholder

Optional placeholder: string

The placeholder to show on the widget.

Inherited from

BaseModel.placeholder


properties

properties: Object

Custom properties of the form field.

Index signature

▪ [key: string]: any

Inherited from

BaseModel.properties


qualifiedName

Readonly qualifiedName: string

Inherited from

BaseModel.qualifiedName


readOnly

Optional readOnly: boolean

Whether the field should be readOnly to end user or not.

Inherited from

BaseModel.readOnly


repeatable

Optional Readonly repeatable: boolean

Field is repeatable or not

Inherited from

BaseModel.repeatable


required

Optional required: boolean

Inherited from

BaseModel.required


rules

Optional rules: Object

Rules that modify the property of the object dynamically. The rules are evaluated whenever the dependency changes.

Index signature

▪ [key: string]: string

Inherited from

ScriptableField.rules


step

Optional step: number

Inherited from

BaseModel.step


type

Optional type: string

Inherited from

BaseModel.type


uniqueItems

Optional uniqueItems: boolean

Inherited from

BaseModel.uniqueItems


valid

Optional valid: boolean

The current validation state of the Field. The property is always computed after merging the Data Model with the Form

Inherited from

BaseModel.valid


validationExpression

Optional validationExpression: string

Inherited from

BaseModel.validationExpression


value

value: any

The current value of the Field. The property is serialized in the Data Model.

Inherited from

BaseModel.value


visible

Optional visible: boolean

Whether the field should be visible to author or not.

Inherited from

BaseModel.visible

Methods

getState

getState(): any

state of the form object

Returns

any

Inherited from

WithState.getState


reset

reset(): any

Resets the form model

Returns

any

Inherited from

BaseModel.reset


syncDataAndFormModel

syncDataAndFormModel(a?): any

Parameters

Name Type
a? default | default

Returns

any

Inherited from

BaseModel.syncDataAndFormModel


validate

validate(): ValidationError[]

Validates the given form field

Returns

ValidationError[]

list of validation errors

Inherited from

BaseModel.validate