aem-forms-af-runtime

Interface: BaseModel

Generic base model interface. Defines common 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.


_eventSource

• _eventSource: EventSource


accept

• Optional accept: string[]

Inherited from

ConstraintsJson.accept


dataRef

• Optional Readonly dataRef: null | string

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


default

• Optional Readonly default: any

Default value of the Field.


description

• Optional description: string

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


enabled

• Optional enabled: boolean

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


enforceEnum

• Optional enforceEnum: boolean

Inherited from

ConstraintsJson.enforceEnum


enum

• Optional enum: any[]

Inherited from

ConstraintsJson.enum


enumNames

• Optional enumNames: string[]

Inherited from

ConstraintsJson.enumNames


exclusiveMaximum

• Optional exclusiveMaximum: string | number

Inherited from

ConstraintsJson.exclusiveMaximum


exclusiveMinimum

• Optional exclusiveMinimum: string | number

Inherited from

ConstraintsJson.exclusiveMinimum


fieldType

• Readonly fieldType: string

Type of field to capture the user data.


format

• Optional format: string

Inherited from

ConstraintsJson.format


fragment

• Readonly fragment: string


id

• Readonly id: string

Unique id of the form field.


index

• Readonly index: number

The index of the Field within its parent.


isContainer

• Readonly isContainer: boolean

Whether the form field is container or not


items

• Optional Readonly items: (FieldModel | FieldsetModel)[]

Array containing Fields or Panels.


label

• Optional label: Label

Label to be used for the field.


lang

• Optional Readonly lang: string

language of the field


maxFileSize

• Optional maxFileSize: string | number

Inherited from

ConstraintsJson.maxFileSize


maxItems

• Optional maxItems: number

Inherited from

ConstraintsJson.maxItems


maxLength

• Optional maxLength: number

Inherited from

ConstraintsJson.maxLength


maxOccur

• Optional maxOccur: number

Inherited from

ConstraintsJson.maxOccur


maximum

• Optional maximum: string | number

Inherited from

ConstraintsJson.maximum


minItems

• Optional minItems: number

Inherited from

ConstraintsJson.minItems


minLength

• Optional minLength: number

Inherited from

ConstraintsJson.minLength


minOccur

• Optional minOccur: number

Inherited from

ConstraintsJson.minOccur


minimum

• Optional minimum: string | number

Inherited from

ConstraintsJson.minimum


name

• Optional Readonly name: string

Name of the form field.


parent

• Readonly parent: null | ContainerModel

The Parent Panel of the Field/Panel.


pattern

• Optional pattern: string

Inherited from

ConstraintsJson.pattern


placeholder

• Optional placeholder: string

The placeholder to show on the widget.


properties

• properties: Object

Custom properties of the form field.

Index signature

▪ [key: string]: any


qualifiedName

• Readonly qualifiedName: string


readOnly

• Optional readOnly: boolean

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


repeatable

• Optional Readonly repeatable: boolean

Field is repeatable or not


required

• Optional required: boolean

Inherited from

ConstraintsJson.required


step

• Optional step: number

Inherited from

ConstraintsJson.step


type

• Optional type: string

Inherited from

ConstraintsJson.type


uniqueItems

• Optional uniqueItems: boolean

Inherited from

ConstraintsJson.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


validationExpression

• Optional validationExpression: string

Inherited from

ConstraintsJson.validationExpression


value

• value: any

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


visible

• Optional visible: boolean

Whether the field should be visible to author or not.

Methods

reset

▸ reset(): any

Resets the form model

Returns

any


syncDataAndFormModel

▸ syncDataAndFormModel(a?): any

Parameters

Name Type
a? default | default

Returns

any


validate

▸ validate(): ValidationError[]

Validates the given form field

Returns

ValidationError[]

list of validation errors