Skip to content

Field Config API Reference

Complete reference for IFieldConfig, the primary type used to define forms as JSON configuration.


Complete Property Reference

PropertyTypeDefaultDescription
typestringundefinedUI component type key. Must match a registered component.
requiredbooleanfalseWhether the field is required. Can be overridden by rules.
hiddenbooleanfalseWhether the field is hidden. Hidden fields skip validation.
readOnlybooleanfalseWhether the field is read-only.
disabledbooleanfalseWhether the field is disabled at the layout level.
labelstringundefinedDisplay label for the field.
defaultValuestring | number | booleanundefinedDefault value when field is visible and value is null.
computedValuestringundefinedExpression or value function reference.
computeOnCreateOnlybooleanfalseComputed value runs only during create.
confirmInputbooleanfalseTriggers confirmation modal on dependent changes.
hideOnCreatebooleanfalseField not rendered in create mode.
skipLayoutReadOnlybooleanfalseIgnores layout-level disabled/readOnly.
rulesIRule[]undefinedDeclarative dependency rules.
validateIValidationRule[]undefinedValidation rules.
optionsIOption[]undefinedStatic dropdown options.
configRecord<string, unknown>undefinedArbitrary config passed to the field component.
itemsRecord<string, IFieldConfig>undefinedField array item definitions.
minItemsnumberundefinedMinimum items in a field array.
maxItemsnumberundefinedMaximum items in a field array.

IOption Interface

typescript
interface IOption {
  value: string | number;
  label: string;
  disabled?: boolean;
  hidden?: boolean;
  selected?: boolean;
  title?: string;
  data?: unknown;
}

IFieldProps Interface

Props injected into every field component via React.cloneElement:

typescript
interface IFieldProps<T> {
  fieldName?: string;
  testId?: string;
  readOnly?: boolean;
  required?: boolean;
  error?: FieldError;
  saving?: boolean;
  value?: unknown;
  config?: T;
  options?: IOption[];
  label?: string;
  type?: string;
  setFieldValue?: (fieldName: string, fieldValue: unknown, skipSave?: boolean, timeout?: number) => void;
}

IRuntimeFieldState

After processing, each IFieldConfig becomes an IRuntimeFieldState at runtime:

PropertyTypeDescription
typestringUI component type (may be swapped by rules)
requiredbooleanWhether the field is required
hiddenbooleanWhether the field is hidden
readOnlybooleanWhether the field is read-only
validateIValidationRule[]Active validation rules
optionsIOption[]Currently available dropdown options
computedValuestringComputed value expression
dependentFieldsstring[]Fields that this field's value changes affect
dependsOnFieldsstring[]Fields whose values affect this field

Built-in Component Types

KeyConstantDescription
"Textbox"ComponentTypes.TextboxSingle-line text input
"Dropdown"ComponentTypes.DropdownSingle-select dropdown
"Toggle"ComponentTypes.ToggleBoolean toggle switch
"Number"ComponentTypes.NumberNumeric input
"Multiselect"ComponentTypes.MultiSelectMulti-select dropdown
"DateControl"ComponentTypes.DateControlDate picker
"Slider"ComponentTypes.SliderRange slider
"DynamicFragment"ComponentTypes.FragmentHidden fragment
"MultiSelectSearch"ComponentTypes.MultiSelectSearchMulti-select with search
"Textarea"ComponentTypes.TextareaMulti-line text input
"DocumentLinks"ComponentTypes.DocumentLinksURL link CRUD
"StatusDropdown"ComponentTypes.StatusDropdownDropdown with color indicators
"ReadOnly"ComponentTypes.ReadOnlyRead-only text display
"ReadOnlyArray"ComponentTypes.ReadOnlyArrayRead-only array display
"ReadOnlyDateTime"ComponentTypes.ReadOnlyDateTimeRead-only date/time
"ReadOnlyCumulativeNumber"ComponentTypes.ReadOnlyCumulativeNumberRead-only cumulative number
"ReadOnlyRichText"ComponentTypes.ReadOnlyRichTextRead-only rich text
"ReadOnlyWithButton"ComponentTypes.ReadOnlyWithButtonRead-only with action button
"ChoiceSet"ComponentTypes.ChoiceSetChoice set / radio group
"FieldArray"ComponentTypes.FieldArrayRepeating field array

Released under the MIT License.