Skip to content

EFormItem Form item ​

import EUI 1.0

Examples ​

Associated label and focus ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Form item ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Properties ​

PropertyDescriptionValues and default
contentDataalias

Content slot; declare QML child objects directly inside the component.

DefaultAlias: fieldContainer.data
enabledbool

Allow interaction; false disables the control.

Defaulttrue
errorstring

Validation message or externally supplied error text.

Default""
errorComponentComponent

Component slot for custom error state; null uses the default content. See this page’s examples for delegate context.

Defaultnull
formvar

Enclosing EForm for this form item; found through ancestors by default.

Defaultnull
formDisabledbool

Disabled state passed from the form to this item.

Defaultfalse
heightreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitHeight
helpTextstring

Field help text.

Default""
hideRequiredAsteriskbool

Hide the required-field asterisk.

Defaultfalse
inheritFormConfigbool

Inherit settings from the enclosing form.

Defaulttrue
inlineMessagebool

Display validation messages inline.

Defaultfalse
labelstring

Label text or option identifier used for display or selection matching.

Default""
labelComponentComponent

Component slot for custom label; null uses the default content. See this page’s examples for delegate context.

Defaultnull
labelPositionstring

Position of the form label.

left
right
top

Default"top"
labelSuffixstring

Text appended to labels.

Default""
labelWidthint

Label width in pixels.

Default0
propstring

Path of this form item in the form model.

Default""
propagateToFieldbool

Propagate disabled, size and validation settings to the field control.

Defaulttrue
requiredbool

Mark this form item as required.

Defaultfalse
requiredAsteriskPositionstring

Position of the required marker relative to the label.

"left" / "right"

Default"left"
requiredMessagestring

Message for an empty required field.

DefaultLocalized text
resettablebool

Allow form reset to reset this field.

Defaulttrue
rowSpacingint

Gap between content, columns, rows or text in pixels.

Default6
rulesvar

Array of validation rules for the current field.

Fields:
required, whitespace, type
len, min, max
pattern, enum, oneOf
validator, transform, message
trigger

Default[]
showMessagebool

Show validation messages.

Defaulttrue
showSuccessStatebool

Show the success state after successful validation.

Defaultfalse
sizeint

Control size; inherits the nearest EConfigProvider by default.

EStyle.Small
EStyle.Medium
EStyle.Large

DefaultInherited; EStyle.Medium by default
validateEventbool

Request enclosing-form validation when the value changes.

Defaulttrue
validateOnChangebool

Validate automatically when a field value changes.

Defaultfalse
validationMessagestring

Validation message or externally supplied error text.

Default""
validationStateint

Input validation state.

EValidationState.None
EValidationState.Success
EValidationState.Warning
EValidationState.Error

DefaultEValidationState.None
validatorvar

Custom field validator returning an error message, boolean or Promise.

Defaultnull
visiblebool

Whether the component is visible.

Defaulttrue
widthreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitWidth
effectiveMessagestringRead only

Form-item message resolved from external errors and validation.

DefaultComputed at runtime
effectiveValidateEventboolRead only

Validation-event setting resolved from form item and field.

DefaultComputed at runtime
fieldItemRead only

Field control found inside the form item.

DefaultComputed at runtime
fieldFocusedboolRead only

Whether the field control is focused.

DefaultComputed at runtime
fieldValuevarRead only

Current value read from the form model or field control.

DefaultComputed at runtime
hasValidationErrorboolRead only

Whether validation state is Error.

DefaultComputed at runtime
isRequiredboolRead only

Whether the field is required after merging required and rules.

DefaultComputed at runtime
validatingboolRead only

Whether asynchronous form validation is running.

DefaultComputed at runtime

Signals ​

SignaturePurpose
validateFinished(string prop, bool valid, string message)

Emitted after field validation; prop is the field path, valid is the result, and message is the validation message.

Methods ​

SignaturePurpose
clearValidation()

Clear validation messages and state without changing field values.

setInitialValue(value)

Set the initial value used when this field is reset.

validateAsync(trigger, callback)

Run asynchronous validation and receive the result through callback.

focusField()

Focus this field input; return whether focus succeeds.

clearValidate()

Clear validation messages and state without changing current data.

resetField()

Restore this field to its initial value and clear validation.

validate(trigger, callback)

Validate the current data; components supporting callback pass the result to that callback.

Released under the MIT License. Third-party assets retain their own licenses.