Generic field set model interface. Defines properties that each field set should have
WithState
<FieldsetJson
>
↳ FieldsetModel
• Readonly
:type: string
Custom widget type show to the user for capturing the data.
• _eventSource: EventSource
• Optional
accept: string
[]
• activeChild: null
| BaseModel
• 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
• 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
ContainerModel.exclusiveMaximum
• Optional
exclusiveMinimum: number
ContainerModel.exclusiveMinimum
• 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
• isFragment: boolean
• items: (FieldModel
| FieldsetModel
)[]
Defines the children/items of the container
• 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
Defines the parent of the container
• 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: "object"
| "array"
• 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
ContainerModel.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
▸ importData(data
): any
Imports the given form data
Name | Type | Description |
---|---|---|
data |
any |
form data |
any
▸ indexOf(f
): number
Returns the index of the child item or the child container
Name | Type | Description |
---|---|---|
f |
FieldModel | FieldsetModel |
child item |
number
index
of the item
▸ isTransparent(): boolean
boolean
▸ reset(): any
Resets the form model
any
▸ syncDataAndFormModel(a?
): any
Name | Type |
---|---|
a? |
default | default |
any
ContainerModel.syncDataAndFormModel
▸ validate(): ValidationError
[]
Validates the given form field
list of validation errors