Interface: FormBuilderProps
Properties of the React Form builder component.
Extends
Omit<FormViewerProps,"language"|"view">
Properties
actions?
optionalactions?:CustomActions
Custom actions for the form viewer.
Inherited from
Omit.actions
builderRef?
optionalbuilderRef?:ForwardedRef<IFormBuilder>
The reference to IFormBuilder.
componentWrapper?
optionalcomponentWrapper?:ComponentType<any>
The React component that wraps every component in a form. Internal use only.
Inherited from
Omit.componentWrapper
context?
optionalcontext?:any
The arbitrary context used internally by the form viewer.
Inherited from
Omit.context
customization?
optionalcustomization?:Partial<Record<string,Options>>
The map of customizations for the FormBuilder components.
defaultBuilderLanguage?
optionaldefaultBuilderLanguage?:`${string}-${string}`
The builder language. When set, it selects the matching entry among FormBuilderI18n.languages.
defaultViewerLanguage?
optionaldefaultViewerLanguage?:`${string}-${string}`
The initial language of the form viewer (form localization preview), e.g. 'en-US'. Unlike the removed FormViewerProps.language prop, this value is only used for the initial selection and does not lock the viewer language.
disabled?
optionaldisabled?:boolean
If true, the form is disabled.
Inherited from
Omit.disabled
errors?
optionalerrors?:Record<string,unknown>
The form validation errors.
Inherited from
Omit.errors
errorWrapper?
optionalerrorWrapper?:ComponentType<ErrorWrapperProps>
The default error wrapper used when errorType is not specified in the form.
Inherited from
Omit.errorWrapper
formName?
optionalformName?:string
The form name. Updating the value triggers the FormViewerProps.getForm function.
Inherited from
Omit.formName
formOptions?
optionalformOptions?:any
The form options. Used to transfer any options to the FormViewerProps.getForm function. Updating the value triggers the FormViewerProps.getForm function.
Inherited from
Omit.formOptions
formStorage?
optionalformStorage?:IFormStorage
The external form storage.
formValidators?
optionalformValidators?:FormValidators
The set of functions that validate the form data.
Inherited from
Omit.formValidators
generateJsonFormSchema?
optionalgenerateJsonFormSchema?: (options) =>string
The JSON schema generator for a form.
Parameters
options
the generator options.
Returns
string
the JSON schema in string format.
getForm?
optionalgetForm?: (name?,options?) =>Promise<string> |string
Loads the form.
Parameters
name?
string
the form name.
options?
any
the form options.
Returns
Promise<string> | string
the string or Promise with the form.
Inherited from
Omit.getForm
i18n?
optionali18n?:FormBuilderI18n
The i18n data of the form builder.
initialData?
optionalinitialData?:Record<string,unknown>
The initial data of the form.
Inherited from
Omit.initialData
initialState?
optionalinitialState?:Record<string,unknown>
The initial user-defined state for the form. This object is set into IFormData.state when the form is initialized, this property is reactive.
Inherited from
Omit.initialState
jsonSchemaFilename?
optionaljsonSchemaFilename?:string
The file name for the generated JSON schema.
licenseKey?
optionallicenseKey?:string
The FormEngine license key.
localizationEngine?
optionallocalizationEngine?:ILocalizationEngine
The localization engine used by the viewer.
Inherited from
Omit.localizationEngine
localize?
optionallocalize?:ComponentLocalizer
The function to localize the properties of a component.
Inherited from
Omit.localize
localStoragePrefix?
optionallocalStoragePrefix?:string
The prefix for localStorage keys.
onBuilderLanguageChange?
optionalonBuilderLanguageChange?: (language) =>void
A callback invoked when the language is changed in the Builder.
Parameters
language
the language.
Returns
void
onFormDataChange?
optionalonFormDataChange?: (data) =>void
The event is called whenever a form data changes.
Parameters
data
the IFormData with all the form data.
Returns
void
Inherited from
Omit.onFormDataChange
onFormElementAdd?
optionalonFormElementAdd?: (payload) =>void
Callback invoked when a component is added to the form.
Parameters
payload
the payload with information about the added component.
insertPosition?
the position at which to insert the component.
presetName?
string
the applied preset name.
slot?
string
the target slot name.
slotCondition?
string
the target slot condition.
source
the source component.
target
the target component.
Returns
void
onFormElementRemove?
optionalonFormElementRemove?: (payload) =>void
Callback invoked when a component is removed from the form.
Parameters
payload
the payload with information about the removed component.
source
the removed component.
Returns
void
onFormSchemaChange?
optionalonFormSchemaChange?: (formSchema) =>void
The event is called whenever a form schema changes.
Parameters
formSchema
string
the current form schema serialized to JSON.
Returns
void
onViewerLanguageChange?
optionalonViewerLanguageChange?: (language) =>void
A callback invoked when the form's language is changed.
Parameters
language
the language.
Returns
void
persistFormName?
optionalpersistFormName?:boolean
If true, the form name will be saved to localStorage and restored when the Form builder is reopened. This functionality is enabled by default.
presetComponentOptions?
optionalpresetComponentOptions?:IPresetComponentOptions
The preset component options.
propertyEditors?
optionalpropertyEditors?:Record<string,ComponentType<AnnotationEditorProps>>
Custom component property editors. Attention! Unstable API.
readOnly?
optionalreadOnly?:boolean
If true, the form is read-only.
Inherited from
Omit.readOnly
showAllValidationErrors?
optionalshowAllValidationErrors?:boolean
If true, all validation errors will be displayed.
Inherited from
Omit.showAllValidationErrors
stylesProvider?
optionalstylesProvider?:ComponentType<StylesProviderProps>
The component that loads the CSS.
theme?
optionaltheme?:FormBuilderTheme
Indicates the theme preference.
userContext?
optionaluserContext?:unknown
Arbitrary host context for the form viewer, available in actions as e.userContext.
The same object reference is shared with parent and child forms; nested fields are not deep-observed.
Pass a new object to replace the context, or a host-owned MobX observable if you need nested reactions.
Inherited from
Omit.userContext
validators?
optionalvalidators?:Partial<Record<keyofSchemaTypeMap,CustomValidationRules>>
The set of metadata of validation rules, grouped by the type of value being validated.
Inherited from
Omit.validators
view
view:
BuilderView
All the metadata of the components of the form builder.
viewerRef?
optionalviewerRef?:ForwardedRef<IFormViewer>
The reference to IFormViewer.
Inherited from
Omit.viewerRef
viewMode?
optionalviewMode?:ViewMode
Display resolution type.
Inherited from
Omit.viewMode