0

On my site, users join groups via an Entity Reference field using the "Check boxes/radio buttons" widget.

The widget default is to display only the group Title. Like so (where the list bullet is a checkbox):

  • Group1Name
  • Group2Name
  • Group3Name

The group content type has an additional field called "description" that I'd like to include on this display. Like so:

  • Group1Name: Group1Description
  • Group2Name: Group2Description
  • Group3Name: Group3Description

Is there a way to theme either the checkbox widget or something in Organic Groups to display this additional field?

1 Answer 1

1

You need to create an entity reference view and use it for your og_groups_ref field. In Views where you click Add, you will see entity reference view next to block, page etc.

Create the view to show the groups and the add fields for title and description. Place description above title and exclude it from display.

Rewrite the title in field settings to something like [title] -[description]. The replacement patterns are in the view field settings.

Go back to your groups audience field settings (main settings, not widget) and choose entity reference view instead of organic groups or simple. Use the view you created.

1
  • Adding the caveat that view field permission needs to be set for non-members at admin > config > group > permissions > node
    – jay-ess
    Commented Feb 27, 2016 at 18:05

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.