Generic base model interface. Defines common properties that each form field should have
WithController
↳ BaseModel
↳↳ FieldModel
• Readonly
:type: string
Custom widget type show to the user for capturing the data.
• _eventSource: EventSource
• Optional
accept: string
[]
ConstraintsJson.accept
• Optional
Readonly
dataRef: null
| string
To map the field’s value to a property in the data model.
• Optional
Readonly
default: any
Default value of the Field.
• Optional
description: string
Extra description to be shown to the user to aid in form filling experience. It can be rich text.
• Optional
enabled: boolean
Whether the field is enabled and takes part in rules, events etc.
• Optional
enforceEnum: boolean
ConstraintsJson.enforceEnum
• Optional
enum: any
[]
ConstraintsJson.enum
• Optional
enumNames: string
[]
ConstraintsJson.enumNames
• Optional
exclusiveMaximum: number
ConstraintsJson.exclusiveMaximum
• Optional
exclusiveMinimum: number
ConstraintsJson.exclusiveMinimum
• Readonly
fieldType: string
Type of field to capture the user data.
• Optional
format: string
ConstraintsJson.format
• Readonly
fragment: string
• Readonly
id: string
Unique id of the form field.
• Readonly
index: number
The index of the Field within its parent.
• Readonly
isContainer: boolean
Whether the form field is container or not
• Optional
Readonly
items: (FieldModel
| FieldsetModel
)[]
Array containing Fields or Panels.
• Optional
label: Label
Label to be used for the field.
• Optional
Readonly
lang: string
language of the field
• Optional
maxFileSize: string
| number
ConstraintsJson.maxFileSize
• Optional
maxItems: number
ConstraintsJson.maxItems
• Optional
maxLength: number
ConstraintsJson.maxLength
• Optional
maxOccur: number
ConstraintsJson.maxOccur
• Optional
maximum: number
ConstraintsJson.maximum
• Optional
minItems: number
ConstraintsJson.minItems
• Optional
minLength: number
ConstraintsJson.minLength
• Optional
minOccur: number
ConstraintsJson.minOccur
• Optional
minimum: number
ConstraintsJson.minimum
• Optional
Readonly
name: string
Name of the form field.
• Readonly
parent: null
| ContainerModel
The Parent Panel of the Field/Panel.
• Optional
pattern: string
ConstraintsJson.pattern
• Optional
placeholder: string
The placeholder to show on the widget.
• properties: Object
Custom properties of the form field.
▪ [key: string
]: any
• Readonly
qualifiedName: string
• Optional
readOnly: boolean
Whether the field should be readOnly to end user or not.
• Optional
Readonly
repeatable: boolean
Field is repeatable or not
• Optional
required: boolean
ConstraintsJson.required
• Optional
step: number
ConstraintsJson.step
• Optional
type: string
ConstraintsJson.type
• Optional
uniqueItems: boolean
ConstraintsJson.uniqueItems
• Optional
valid: boolean
The current validation state of the Field. The property is always computed after merging the Data Model with the Form
• Optional
validationExpression: string
ConstraintsJson.validationExpression
• value: any
The current value of the Field. The property is serialized in the Data Model.
• Optional
visible: boolean
Whether the field should be visible to author or not.
▸ reset(): any
Resets the form model
any
▸ syncDataAndFormModel(a?
): any
Name | Type |
---|---|
a? |
default | default |
any
▸ validate(): ValidationError
[]
Validates the given form field
list of validation errors