I have a form with 5 custom fields. I would like to hide a couple of fields based on the view mode in the back-end while the user is editing the form. Right now you can easily hide the field in the front end, but i am looking for way to not confuse the editors and hide the form fields while they are making changes. Disable fields still show up in the back-end.

My goal is simple: if your view mode has the field disable it should not show up in the back-end and in the front end.

is there a setting or a hook that can allow me to accomplish that.

  • Would setting field permissions work? Oct 14, 2017 at 5:09

1 Answer 1


Making this based if it's printed on a view mode, makes things quite complex. You'll have to write a custom module.

Try using the Fields Permissions which is based on Roles. So just check mark the Roles that should be able to see the field in the front.

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.