Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Interface: FormViewerProps

@react-form-builder/core.FormViewerProps

Form viewer React component properties.

Properties

actions

Optional actions: CustomActions

Custom actions for the form viewer.


componentWrapper

Optional componentWrapper: ComponentType<any>

The React component that wraps every component in a form. Internal use only.


computeChildren

Optional computeChildren: ComputeChildren

Function that calculates all child properties of a component. Internal use only.


erroneous

Optional erroneous: boolean

If true, the component will not be wrapped by the error display component. Attention! Don't use it! Unstable API.


errorWrapper

Optional errorWrapper: ComponentType<ErrorWrapperProps>

The default error wrapper used when errorType is not specified in the form.


event

Optional event: (stream: EventStream) => void

Type declaration

▸ (stream): void

The function for processing form events. Internal use only.

Parameters
NameTypeDescription
streamEventStreamthe event stream of the form viewer.
Returns

void


formName

Optional formName: string

The form name.


formValidators

Optional formValidators: FormValidators

The set of functions that validate the form data.


getForm

Optional getForm: (name?: string) => string | Promise<string>

Type declaration

▸ (name?): string | Promise<string>

Loads the form.

Parameters
NameTypeDescription
name?stringthe form name.
Returns

string | Promise<string>

the string or Promise with the form.


initialData

Optional initialData: Record<string, unknown>

The initial data of the form.


language

Optional language: Language

The language of form.


licenseKey

Optional licenseKey: string

The FormEngine license key.


localize

Optional localize: ComponentLocalizer

The function to localize the properties of a component.


onFormDataChange

Optional onFormDataChange: (data: IFormData) => void

Type declaration

▸ (data): void

The event is called whenever a form data changes.

Parameters
NameTypeDescription
dataIFormDatathe IFormData with all the form data.
Returns

void


validators

Optional validators: Partial<Record<keyof SchemaTypeMap, CustomValidationRules>>

The set of metadata of validation rules, grouped by the type of value being validated.


view

view: View

All the metadata of the components of the form viewer.


viewMode

Optional viewMode: ViewMode

Display resolution type.


viewerRef

Optional viewerRef: ForwardedRef<IFormViewer>

The reference to IFormViewer.