Generic field model interface. Defines properties that each form field should have
WithState
<FieldJson
>
↳ FieldModel
↳↳ CaptchaModel
• Readonly
:type: string
Custom widget type show to the user for capturing the data.
• _eventSource: EventSource
• Optional
accept: string
[]
• 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
Readonly
displayFormat: string
format in which user will see the value after update
• Optional
Readonly
displayValue: string
value to be displayed to the user after update
• Optional
Readonly
displayValueExpression: string
expression that when evaluated returns the displayValue of a field
• Optional
Readonly
editFormat: string
format in which user will edit the value
• Optional
Readonly
editValue: string
value to be displayed to the user for edit
• Optional
enabled: boolean
Whether the field is enabled and takes part in rules, events etc.
• Optional
enforceEnum: boolean
• Optional
enum: any
[]
• Optional
enumNames: string
[]
• Optional
events: Object
Events is a dictionary of eventName to the actions to perform.
▪ [key: string
]: string
• Optional
exclusiveMaximum: number
• Optional
exclusiveMinimum: number
• Readonly
fieldType: string
Type of field to capture the user data.
• Optional
format: string
• 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
• Optional
maxItems: number
• Optional
maxLength: number
• Optional
maxOccur: number
• Optional
maximum: number
• Optional
minItems: number
• Optional
minLength: number
• Optional
minOccur: number
• Optional
minimum: number
• Optional
Readonly
name: string
Name of the form field.
• parent: ContainerModel
Parent of the current field
• Optional
pattern: string
• 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
• Optional
rules: Object
Rules that modify the property of the object dynamically. The rules are evaluated whenever the dependency changes.
▪ [key: string
]: string
• Optional
step: number
• Optional
type: string
• Optional
uniqueItems: boolean
• 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
BaseModel.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.
▸ getState(): any
state of the form object
any
WithState.getState
▸ reset(): any
Resets the form model
any
▸ syncDataAndFormModel(a?
): any
Name | Type |
---|---|
a? |
default | default |
any
BaseModel.syncDataAndFormModel
▸ validate(): ValidationError
[]
Validates the given form field
list of validation errors