Restore widget of a disabled field

Created on 10 January 2022, almost 3 years ago
Updated 2 February 2024, 11 months ago

Problem/Motivation

When i disable a field its widget changes and it should change it back to the previous widget when i enable it.

Steps to reproduce

  • Go to the Manage Form Display tab of a Content type. (Article for example)
  • Change the "Authored by" field widget to "Select list" and save it
  • Move this field to the "Disabled" area and save it
  • Its widgets changed to "Check boxes/radio buttons"
  • Enable it again, the widget changes to "Autocomplete" instead of "Select list"

Proposed resolution

Either don't change the widget when disabling/enabling the field or at least, when enabling the field, change it to the previous widget.

Remaining tasks

Create a patch
Test it
Commit

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Field 

Last updated 2 days ago

Created by

🇧🇷Brazil hmendes

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.

  • 🇳🇿New Zealand quietone

    I tested this on Drupal 10.1.x, standard install and confirmed the problem.

  • 🇮🇳India shalini_jha

    I attempted to reproduce the reported issue in Drupal 11.x; however, the observed behavior differs from what is described in the issue (IS).
    If we do not manually change the "Authored by" field widget to "Select list" but instead drag and disable this field, it automatically switches the field widget to a select list. Conversely, upon enabling this field, the widget changes to autocomplete.

Production build 0.71.5 2024