Skip to content

buildForm

Overview

Builds the form configuration by setting up state management for fields, components, and widgets.

Signature

buildForm(props, state, getFieldComponent, getFieldProps, getWidgetComponent, getWidgetProps)

Parameters

NameTypeRequiredDescription
propsobjectyesThe reactive props object containing form metadata.
stateobjectyesThe target reactive object to manage for form state.
getFieldComponent(field: FieldInfo) => ComponentyesFunction to retrieve the component for a given field.
getFieldProps(field: FieldInfo) => anyyesFunction to retrieve field-specific properties.
getWidgetComponent(field: FieldInfo) => ComponentyesFunction to retrieve the widget for a given field.
getWidgetProps(field: FieldInfo) => anyyesFunction to retrieve widget-specific properties.

props Properties

NameTypeRequiredDefaultDescription
appstringThe app label.
modelstringThe model name.
viewstringThe view name.

state Properties

NameTypeRequiredDefaultDescription
fieldDetailsobjectDetails of each field by name.
fieldsstring[]The list of field names.

Returns

BuildForm

Functions for managing form configuration and updating reactive state.

Source

client/lib/utils/buildForm.js:82

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2