Leverage Drupal Form API for CSS class plugin

Created on 12 October 2022, over 1 year ago
Updated 18 February 2024, 4 months ago

Problem/Motivation

The CSS class plugin currently only supports textfield and select as input types. Especially selection of multiple classes is not very user friendly with the select element. Radios are a great input type for short option lists.

Proposed resolution

Allow to customize the UI by leverage existing Drupal form API render elements:

  1. Create a new key input_type which corresponds to a form API render element #type. Additionally support the types radios and checkboxes
  2. Provide sensible defaults to prevent BC breaks with existing configs: If key option is set, default the input type to select, if no options are set default to textfield.
  3. Support mandatory options using by mapping the new key required to form API's #required key.
✨ Feature request
Status

Needs review

Version

1.0

Component

User interface

Created by

🇦🇹Austria hudri Austria

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

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.69.0 2024