Skip to Content
DocsForms in O3Form engine implementations

Form engine implementations

The OpenMRS Reference Application uses the O3 Form Builder with the React Form Engine. An Angular Form Engine integration is also available for distributions that choose it, but it is not part of the Reference Application’s default Forms workflow.

For new implementations, we recommend the React Form Engine. It is included in the Reference Application and powers the O3 Form Builder preview, so forms use the same engine during authoring and at runtime. Existing implementations that depend on Angular forms or custom extensions can continue using the Angular integration while assessing migration. Test those forms and extensions against React before switching engines.

Packages and roles

RoleDefault React workflowAngular workflow
Form builder@openmrs/esm-form-builder-app, which previews forms with the React Form EngineNo supported Angular preview in the O3 Form Builder
Renderer library@openmrs/esm-form-engine-lib@openmrs/ngx-formentry
O3 integration module@openmrs/esm-form-engine-app@openmrs/esm-form-entry-app
Reference Application statusIncluded by defaultNot included by default

Both integration modules register a renderer in form-widget-slot. A distribution should enable the integration that matches its Forms workflow, not both integrations as competing renderers for the same slot.

Default Reference Application workflow

The supported default path is:

  1. Create or edit a form with the O3 Form Builder.
  2. Preview the form with the React Form Engine embedded in the builder.
  3. Publish the form and render it with the React Form Engine at runtime.

See Using forms in applications for the patient chart workspace and custom React rendering options.

Angular workflow

Distributions that use the Angular Form Engine should author schemas manually or manage them through a separate implementation-specific process, then test them against @openmrs/esm-form-entry-app in the target distribution.

The O3 Form Builder has no supported Angular preview and makes no compatibility promises for the Angular Form Engine. A form that previews correctly in the builder can still behave differently in the Angular runtime.

Schema validity and runtime compatibility

The O3 form schema  defines shared structure and vocabulary for O3 JSON forms. A form that validates against the schema can still behave differently in the two engines: renderings, expression helpers, custom extensions, and runtime behavior are not guaranteed to match.

Validate a form against the shared schema, then test it with the renderer and integration module used by the target distribution.

Last updated on