aem-forms-af-runtime

Interface: ContainerModel

Generic container model interface. Defines properties that each container 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


activeChild

• activeChild: null | BaseModel


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


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: string | number

Inherited from

BaseModel.exclusiveMaximum


exclusiveMinimum

• Optional exclusiveMinimum: string | 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


isFragment

• isFragment: boolean


items

• items: (FieldModel | FieldsetModel)[]

Defines the children/items of the container

Overrides

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: string | 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: string | number

Inherited from

BaseModel.minimum


name

• Optional Readonly name: string

Name of the form field.

Inherited from

BaseModel.name


parent

• parent: ContainerModel

Defines the parent of the container

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

importData

▸ importData(data): any

Imports the given form data

Parameters

Name Type Description
data any form data

Returns

any


indexOf

▸ indexOf(f): number

Returns the index of the child item or the child container

Parameters

Name Type Description
f FieldModel | FieldsetModel child item

Returns

number

index of the item


isTransparent

▸ isTransparent(): boolean

Returns

boolean


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