I want to reproduce programmatically hiding of a field that can be obtain by Manage Display -> Format -> (hidden)

URL: admin/config/people/accounts/fields.

Field I want to hide is added by OG module. Probably. Machine name: og_user_user.

I found one solution based on hook_field_access but I need to find other.

This solution doesn't help me too.

  • 1
    Where you want to hide it? Dec 16, 2014 at 13:00
  • And why exactly solution you found is not good for you? And what is it in the first place? If you won't tell us, possibly someone will provide it to you again - waste of his time, waste of your time.
    – Mołot
    Dec 16, 2014 at 13:11
  • @Mołot question edited. Client want to hide it once (preferred in custom module install file). Using hook is just unaccepted. At least for now.
    – Codium
    Dec 16, 2014 at 13:47
  • What do you mean by "hide it once"? After cache clear it should be shown again? Or what?
    – Mołot
    Dec 16, 2014 at 13:49
  • @Mołot using this hook is redundant, or I am wrong? Code in install file is invoked only once.
    – Codium
    Dec 16, 2014 at 13:50

1 Answer 1


Solution is pretty damn simple. I forgot about field_update_instance function.

To get data for passing to this function there is a need of debug: field_ui_display_overview_form_submit

where all Manage Display forms are submitted.

I end up using custom drush command after all custom modules are installed

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.