Getting started
To render a dynamic form, you need:- A schema — the JSON Schema defining data types and validation
- A uiSchema — the UI Schema defining layout and controls
- A data — (optional) existing data to prefill the form
- A renderer — either a JSON Forms library or your own implementation
Using JSON Forms libraries
The fastest way to get started is using an official JSON Forms renderer: These libraries handle schema interpretation, validation, and rendering out of the box.Custom renderers for Enterprise API Suite
You may need to implement custom renderers for options specific to the Enterprise API Suite:| Option | Implementation |
|---|---|
dataSource: "countries" | Fetch country list from List countries endpoint |
exclude | Filter the data source based on the specified restriction |
Building a custom renderer
If you need full control over the user experience, you can build your own form renderer. Your implementation must:- Parse the schema — Extract property definitions, types, and validation rules
- Parse the uiSchema — Build the layout tree from elements
- Render controls — Map schema types to appropriate input components
- Apply rules — Evaluate conditions and show/hide/enable/disable elements
- Validate input — Enforce schema constraints before submission
- Handle progressive disclosure — Re-render when the API returns updated schemas
Handling progressive disclosure
When implementing progressive disclosure:- Render the form from
schema,uiSchema, and any existingdata - Collect user input for the current step (Category)
- Submit the answers to the API
- Compare the new response with the previous one:
- If there’s a new root property in the schema, or a new Category in the uiSchema, re-render the form to show the new questions
- If the schema and uiSchema are unchanged, the form is complete
Example: React custom renderer for dataSource
Here’s an example of a custom renderer that handles thedataSource option:
- Detecting the
dataSourceoption with a custom tester - Fetching options from the API and applying
excludefilters - Using Material UI’s Autocomplete for consistent styling
- Passing existing
datato prefill the form