Skip to content

Field Configuration Reference

This is the complete reference for IFieldConfig, the primary consumer-facing type used to define forms as JSON configuration. Each form is defined as a Record<string, IFieldConfig> where the key is the field name and the value is its configuration.


Complete Property Reference

PropertyTypeDefaultDescription
typestringundefinedUI component type key (e.g., "Textbox", "Dropdown", "Toggle"). Must match a registered component.
requiredbooleanfalseWhether the field is required for form submission. Can be overridden by rules.
hiddenbooleanfalseWhether the field is hidden (not rendered). Hidden fields skip validation.
readOnlybooleanfalseWhether the field is read-only (rendered but not editable).
disabledbooleanfalseWhether the field is disabled at the layout level.
labelstringundefinedDisplay label for the field.
defaultValuestring | number | booleanundefinedDefault value applied when the field is visible and its current value is null.
computedValuestringundefinedExpression string evaluated reactively. Uses $values.fieldName or "$fn.functionName()".
computeOnCreateOnlybooleanfalseIf true, the computed value runs only during create (not edit).
confirmInputbooleanfalseWhether changing dependents triggers a confirmation modal.
hideOnCreatebooleanfalseIf true, the field is not rendered in create mode.
skipLayoutReadOnlybooleanfalseIf true, the field ignores layout-level disabled/readOnly override.
rulesIRule[]undefinedDeclarative dependency rules.
validateIValidationRule[]undefinedValidation rules (sync, async, and cross-field).
optionsIOption[]undefinedStatic dropdown options.
configRecord<string, unknown>undefinedArbitrary configuration passed through to the field component.
itemsRecord<string, IFieldConfig>undefinedField configs for repeating field array items.
minItemsnumberundefinedMinimum number of items in a field array.
maxItemsnumberundefinedMaximum number of items in a field array.

Basic Example

typescript
const fieldConfigs = {
  title: {
    type: "Textbox",
    required: true,
    label: "Project Title",
  },
  status: {
    type: "Dropdown",
    required: true,
    label: "Status",
    options: [
      { value: "Active", label: "Active" },
      { value: "Inactive", label: "Inactive" },
    ],
  },
  notes: {
    type: "Textarea",
    label: "Notes",
  },
};

Rules

Rules are defined as an IRule[] array on a field. See the Rules Engine page for full details.


Validation

Reference validators by name in IFieldConfig.validate:

typescript
{
  email: {
    type: "Textbox",
    label: "Email",
    validate: [
      { validator: "EmailValidation" },
      { validator: "checkEmailUnique", async: true, debounceMs: 500 },
    ],
  },
}

See the Validation page for the full validator reference.


Computed Values

typescript
{
  total: {
    type: "Number",
    label: "Total",
    readOnly: true,
    computedValue: "$values.quantity * $values.unitPrice",
  },
}

See the Expression Syntax page for the full expression reference.


Built-in Component Types

KeyDescription
"Textbox"Single-line text input
"Dropdown"Single-select dropdown
"Toggle"Boolean toggle switch
"Number"Numeric input
"Multiselect"Multi-select dropdown
"DateControl"Date picker
"Slider"Range slider
"DynamicFragment"Hidden fragment
"MultiSelectSearch"Multi-select with search
"Textarea"Multi-line text input
"DocumentLinks"URL link CRUD
"StatusDropdown"Dropdown with color indicators
"ReadOnly"Read-only text display
"ReadOnlyArray"Read-only array display
"ReadOnlyDateTime"Read-only date/time display
"ReadOnlyCumulativeNumber"Read-only cumulative number
"ReadOnlyRichText"Read-only rich text
"ReadOnlyWithButton"Read-only with action button
"ChoiceSet"Choice set / radio group
"FieldArray"Repeating field array

Released under the MIT License.