Allow forms to be defined in three segments: schema, UI, data

Created on 2 October 2017, over 7 years ago
Updated 12 June 2023, over 1 year ago

Problem/Motivation

Form arrays are a tight coupling of three concepts:

  • Schema: The fields represented by the form, their title, and their data type. Also includes validation definitions like "minimum value".
  • UI: The presentational information, like "radios vs select list". Also includes whether the element is disabled.
  • Data: The current values of the form (either default values, or the live values as they are changed by the user).

Separating these concerns will be essential to moving any form rendering to the client side.

Proposed resolution

Using https://github.com/mozilla-services/react-jsonschema-form as a target, write a layer to parse existing FAPI arrays into each of the three components needed: schema, uiSchema, formData.

Find all of the pain points that need fixing on the Drupal side.

A companion issue should be opened to work on deciding if the existing React project should be extended or replaced to handle Drupal's custom needs.

Remaining tasks

TBD

User interface changes

N/A (ideally!)

API changes

TBD

Data model changes

N/A

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
FormΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States tim.plunkett Philadelphia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024