[SOLVED][Drupal Organic Groups]How to hide the Organic Group field from users entirely?

| | 1 min read

A large number of Drupal users using the Drupal Organic Groups module in their Drupal site wanted to know how to hide the Organic Group field from the users directly. If you are facing the same question in your Drupal site and would like to know how to hide the Organic Group field from your users then read on to find out the solution.

Here is the solution suggested by a Drupal user. You can configure Organic Groups to be transparent to your group members by using the Entityreference prepopulate module

  • First enable the Entityreference Prepopulate module
  • Next proceed to your group content entity and edit the group membership field
  • Next enable 'Enable reference prepopulate under Additional behaviors
  • After doing the above select
    'Action: Hide Field'
    'Apply action on edit'
  • Finally you need to create links to create new content that has the prepopulate data in the URL
  • It shoud be of the format
    form: node/add?og_group_ref=GROUP_NODE_ID

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal services to help you maintain and manage your Drupal websites. Get in touch with us to know more.