Use field_ui.settings instead of altering form

Created on 9 April 2023, over 1 year ago

Problem/Motivation

In Drupal 8+, the field prefix is controlled by the field_ui.settings configuration.

Proposed resolution

  1. Remove current code in .module.
    • Using hook_form_FORM_ID_alter() to set the '#maxlength' value to 32 seems fine to leave in.
    • Wrapping the element in a <span> element with dir seems unrelated to field machine name prefixes. Maybe open an issue against core?
  2. Add a menu link, route, and Form class.
  3. Expose field_ui.settings via the form.
  4. Add an hook_update_N() function in a .install file to update field_ui.settings config.

Remaining tasks

Open an MR

User interface changes

None.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Chris Burge

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

Comments & Activities

Production build 0.71.5 2024