I've hit a problem using one og_group_ref field over multiple content types. I need to have the field editable for one content type in a view and provide the select list options from another view.

At the moment, I have the editable field in the view showing all nodes for all content types as options which isn't acceptable. A new field isn't an option.

Editable Fields
Content type: course_students
Field: og_group_ref
View: resources > panel_pane_2
View providing nodes: abc > def

I've been away from Drupal for a couple of months and am completely lost so any help with a custom module to give this functionality would be greatly appreciated.

The below image shows the current problem where two content types are in the drop down list. This list instead needs to have nodes provided by a view.


  • I do not understand your question. Do you just want to show your node in a view, or do you want to edit it in a form?
    – Maouna
    Commented Jul 11, 2016 at 10:42
  • I have a view showing node titles and the og_group_ref field as Editable. drupal.org/project/editablefields I need to provide different values for the drop down list using the results of another view. Commented Jul 11, 2016 at 10:45

1 Answer 1


It's not a form alter but it's an easy solution using rules.. I added a second entity reference field that only listed the nodes I wanted. Then I used two rules to make sure the two fields always match, whichever is updated.

This is one of the rules for when og_group_ref changes. The other one is the same except for when the second entity reference field changes.


Why am I posting this as a solution when it's different to the question? Because it's very quick, most people use rules and it's applicable in many situations.

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.