Add option to Disable or Hide the prepopulated fields in the entity form

Created on 8 December 2021, over 3 years ago
Updated 14 April 2024, about 1 year ago

Problem/Motivation

I think in the most cases you want to prepopulate a field you also don't want the user creating the entity to inadvertently change the field value

Proposed resolution

Add two options in the field settings to hide or disable the prepopulated field

Just requesting the feature here, unfortunately I don't have the skills and time needed for the development, but I can sponsor it (is there a way to do it?).
Thank you

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

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.

  • 🇮🇹Italy kopeboy Milan

    FYI, this can be achieved with the help of other modules in conjunction with Entity Prepopulate:

    1. ECA with the ECA Form submodule: you need to react to the event "After build form" with action "Form field: set as disabled"
    2. Conditional_fields module, only if you can react on another field on the same entity form: in Manage Dependencies select your Target field, the Controller field, set target as Disabled when control is Filled.
  • 🇸🇰Slovakia coaston

    As workaround you can use

    I am using field group > html element and creates css "hide_prepoulate" like :

    hide_prepoulate {display:none;}
    

    I will add field group called "admin" or so and add fields unders this group which have to be hidden (not visible for user) and add to Extra CSS classes option "hide_prepoulate".

Production build 0.71.5 2024