I need to do so in order to solve an issue I am facing with another contrib module. Thank you.

Comments

W.M. created an issue.

mariacha1’s picture

Disabling field permissions for a given field can be done a few ways:

1) (Not in code but worth mentioning) You can set the field permission to "Public". This is equivalent to ignoring Field Permissions for this field.

2) If you wish to sometimes hide a field programmatically, you can set the field's permissions to "Custom", check every checkbox, then use the hook_field_permissions_custom_field_access() hook http://cgit.drupalcode.org/field_permissions/tree/field_permissions.api.... to hide the field as needed.

3) If you just want to get the value of a field regardless of the access permission levels, you can do that by using the field_get_items() function as outlined in https://www.drupal.org/node/1904122#comment-11730011

There are likely other ways, depending on your situation, so feel free to follow up with more details if none of these work.

W.M.’s picture

@mariacha1

Thank you very much that was informative.