React field types and renderings
In the React Form Engine, type and questionOptions.rendering are independent contracts:
typeselects a field-value adapter, which reads existing data and creates submission data.renderingselects the input or display control.
The Form Builder exposes choices for authoring, but its dropdown is not a guarantee that a type/rendering combination has the metadata or server support it needs. The builder preview renders through the React Form Engine.
Field adapter types
type | Built-in React adapter | Offered by the Interactive Builder |
|---|---|---|
obs | Observation | Yes |
obsGroup | Grouped observations | Yes |
control | Non-submitting/display control | Yes |
testOrder | Orders | Yes |
programState | Program state | Yes |
encounterLocation | Encounter location | Yes |
encounterProvider | Encounter provider | Yes |
encounterRole | Encounter role | Yes |
encounterDatetime | Encounter date/time | Yes |
patientIdentifier | Patient identifier | Yes |
personAttribute | Person attribute | Yes |
diagnosis | Encounter diagnosis | No; use the Schema Editor |
obsComment | Observation comment | No; generated by showComment |
inlineDate | Observation date override | No; generated by showDate |
A type that has no built-in or registered adapter cannot reliably load or submit a value. There is no generic submission fallback for unknown types.
Rendering inventory
“Builder” below means the rendering appears in the builder’s default renderingTypes list. Only some renderings have a
dedicated options panel; the Schema Editor remains necessary for properties the interactive UI does not expose.
rendering | React runtime behavior | Builder |
|---|---|---|
text | Single-line text control | Yes |
textarea | Multi-line text control | Yes |
number | Numeric control with min/max, step, and decimal options | Yes |
date | Date control; defaults to calendar mode | Yes |
datetime | Date control; defaults to combined date/time mode | Yes |
select | Single-selection dropdown | Yes |
radio | Single selection as radio buttons | Yes |
checkbox | Multiple selection | Yes |
checkbox-searchable | Normalized to checkbox with searchable behavior | Yes |
content-switcher | Single selection with a content switcher | Yes |
toggle | Boolean-style toggle | Yes |
ui-select-extended | Searchable data-backed selection control | Yes |
select-concept-answers | Searchable control backed by a concept’s answers | Yes |
drug | ui-select-extended template backed by the drug data source | Yes |
problem | ui-select-extended template backed by the problem data source | Yes |
encounter-location | Data-backed location template | Yes |
encounter-provider | Data-backed provider template | Yes |
encounter-role | Data-backed encounter-role template | Yes |
file | File upload control | Yes |
fixed-value | Read-only fixed value | Yes |
group | Nested grouped fields | Yes |
repeating | Repeatable nested fields | Yes |
markdown | Rendered Markdown content; normalized to control | Yes |
workspace-launcher | Button that launches a named O3 workspace; normalized to control | Yes |
extension-widget | Declared by the type/schema and offered by the builder, but has no built-in registered control in the current library | Yes |
The normative schema still accepts the legacy multiCheckbox name, and the React transformer normalizes it. Use
checkbox-searchable in new schemas.
Common field examples
A coded observation supplies its own answer concepts:
{
"id": "visitOutcome",
"label": "Visit outcome",
"type": "obs",
"questionOptions": {
"rendering": "radio",
"concept": "33333333-3333-3333-3333-333333333333",
"answers": [
{
"label": "Completed",
"concept": "44444444-4444-4444-4444-444444444444"
},
{
"label": "Referred",
"concept": "55555555-5555-5555-5555-555555555555"
}
]
}
}A repeating observation group carries nested questions:
{
"id": "symptoms",
"label": "Symptoms",
"type": "obsGroup",
"questionOptions": {
"rendering": "repeating",
"concept": "66666666-6666-6666-6666-666666666666",
"repeatOptions": {
"addText": "Add symptom",
"limit": "5"
}
},
"questions": [
{
"id": "symptomName",
"label": "Symptom",
"type": "obs",
"questionOptions": {
"rendering": "text",
"concept": "77777777-7777-7777-7777-777777777777"
}
}
]
}Fallback and unsupported behavior
- An
obsquestion without a concept falls back to a disabled text control, except forfileandfixed-valuerenderings. This makes the metadata problem visible; it does not make the question submit correctly. - An unknown or unregistered rendering resolves to no control, so the field does not render.
extension-widgetrequires distribution code to register a compatible control. The presence ofextensionIdandextensionSlotNamein JSON does not install that control.checkbox-searchableis transformed to thecheckboxcontrol withisCheckboxSearchable: true.drug,problem, encounter metadata, and concept-answer templates depend on their registered data sources and the corresponding OpenMRS APIs.
Use Troubleshooting forms when the builder accepts a schema but its preview or runtime behavior is incomplete.