Disabling a field within a Custom Field

Created on 28 April 2025, 2 days ago

Problem/Motivation

Hello! I love how the Custom Field supports multi fields within the same database table, instead of having one field per table. However, I do not see any options to disable fields within a Custom Field. Normal fields could be assigned "disabled" under the Manage Form Display. It would be great if Custom Field can do the same - disable certain fields within a Custom Field. For example, if I define a Custom Field with fields A, B, C, and D, I would like to "manage form display" and disable/hide fields A and C, much like what the Paragraphs module is doing (please see attached screen capture for disabling Paragraphs fields). Thank you!

✨ Feature request
Status

Active

Version

3.1

Component

User interface

Created by

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

Comments & Activities

  • Issue created by @ikam
  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    Hi, this is handled in the widget settings for the field. There's a widget type called 'Hidden' for every field type. On the manage fields page, just scroll to the widget settings section and change the widget type to that and you'll be good to go. There is also a "Hidden" formatter type in the manage display settings if you want to hide its rendering.

  • Hi - I do see the 'Hidden' option for Manage Fields. However that only affects the page display (when viewing the entity), it doesn't apply to the Form display (when editing the entity). I'm trying to hide some of the fields when displaying the edit Form to the users. Thanks.

  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    Hi, you may be looking in the wrong place. Below the storage settings where you setup the fields originally, there is a section to configure the widgets. This screenshot is slightly out of date however the dropdown on the left is where you can switch the form element type and there is an option labeled "Hidden". https://www.drupal.org/files/project-images/Screenshot%202023-08-31%20at... β†’

  • I am looking at the wrong place! I see the option now - and I'm able to hide some of the fields inside a Custom Field. Thank you very very much for your fast response and your help!

Production build 0.71.5 2024