Allow declaring a concrete plugin to render the schema data item

Created on 6 May 2025, 13 days ago

Problem/Motivation

The Drupal Schema provides a limited list of data item types, that are supported. But in the form pretty often we need to customize the element to handle a specific data type.

For example, we have just a "string" data type, but in the form - want to render it as a password field.
Or an integer field, but actually it should be the entity reference and store the target entity id.
Etc.

Proposed resolution

Seems a good solution can be allowing to declare explicitly what plugin we want to use to represent the data item in the form, something like this:

schema_form_test.my_api_config:
  type: config_object
  label: API Configuration
  mapping:
    password:
      type: string
      label: Password
      third_party_settings: password
        schema_form:
          plugin: password
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇦🇲Armenia murz Yerevan, Armenia

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

Comments & Activities

Production build 0.71.5 2024