Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

JSON Form Widget

Security covered Under active development 231 sites

This module allows you to create Drupal form fields dynamically using a JSON schema. It provides flexibility for customizing content types without needing to hardcode each field, drawing inspiration from the react-jsonschema-form project. A separate plugin is required to supply the schema that defines the form's fields.

JSON Form Widget

This module provides a versatile way to create Drupal form elements from a JSON schema. Why would you need to create a form from JSON? This allows for a wide range of flexibility when customizing a content type without hard coding every field.

The inspiration for this module and the syntax for the UI Schema come from react-jsonschema-form. While the UI schemas are not actually interoperable at this time, and RJSF supports more features of JSON-Schema than this module is currently able to, we hope to close that gap over time.

TIP: A good way to visualize what this module is doing is to use RJSF team's react-jsonschema-form playground as this modules functionality is largely similar in regards to how the schema translates to different form fields/structure.

Plugin

This module requires a plugin to provide a "widget" that will supply the schema(s) that define the fields of the form(s). At the moment, the module does not ship with a standalone plugin, so can be thought of as an "API module" (we hope to change this situation soon). JSON Form Widget was originally part of the DKAN module, and a working example of a widget plugin can be seen in the DKAN codebase.

Using a combination of "router", "helper", and "handler" classes, as well as some extensions on Drupal core elements, a widget plugin needs to implement its own logic to retrieve the correct JSON Schema. JSON Form Widget then builds the form according to the retrieved schema and any schema user interface options if supplied (see SchemaUiHandler.php and its contained methods for more information about UI options).

The examples section of this README can be used to understand how different field types translate directly to Drupal form elements and subsequently, how they would look within the Drupal user interface. They come from the default schemas in DKAN but represent most of what is currently available from JSON Form Widget, no matter where your schema comes from.

Drupal 10–11

Ask your assistant about JSON Form Widget

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

1 tracked project depends on this one

Activity

Tracked releases
6
Tracked since
Sep 2025
Latest release
4 months ago
Releases (12 mo)
5 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.2 Stable 10–11 Jun 4, 2026
1.0.1 Stable 10–11 May 13, 2026
1.0.0 Stable 10–11 May 11, 2026
1.0.0-alpha2 Pre-release 10–11 Feb 19, 2026
1.0.0-alpha1 Pre-release 10–11 Dec 11, 2025
1.x-dev Dev 10–11 Sep 26, 2025