1

I need to hide the description field from regular users when entering data, but the field should be visible to administrator users, which also can edit it. I used the Display Suite module to hide that field by using different view modes, but I could not figure it out how to hide the field on forms. Any guidance would be appreciated!

screenshot

1
  • 1
    I don't think that's possible using Display Suite. It looks like the User role field module does what you want. Commented Dec 22, 2019 at 15:49

1 Answer 1

0

Display Suite is not what you need, field_permissions is, check out the screen.

DS is mostly used to change the global look and the availability of some fields and labels (like Teaser, Product, Fullpage ...)

enter image description here

3
  • Hi Ben - Thanks a lot for sharing this module with me. One issue I see here is that I use col-md-6 and have 2 columns but I want to be able to change the layout too for different user views. Would this module help with that too or would you recommend another module for it.
    – Efe
    Commented Dec 23, 2019 at 12:08
  • This seems to be very specific, too specific to be handled by a single module. In my opinion, you can try with Drupal Form States API (api.drupal.org/api/drupal/includes%21common.inc/function/…)
    – Tarto
    Commented Dec 23, 2019 at 12:34
  • much appreciated thank you!
    – Efe
    Commented Jan 1, 2020 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.