I'm using Organic Groups 2.x module, which comes with it's own widgets for Entity Reference fields. I would like to use reference from user to his/her group to autofill values in user entity based on corresponding fields of the group. As I understand it, it's currently not possible, because of different widgets and need to have same field on both source and destination for autofilling.

Is support for OG on the roadmap?

Comments

jgullstr’s picture

Hi milos.kroulik,

I have added some more API functions and a sub-module, that attempts to handle the OG widget, in the latest dev version. Try it out and let me know how it works.

//Josef

jgullstr’s picture

Status: Active » Needs review
milos.kroulik’s picture

Hi Josef,

thanks for quicḱ reply and submodule. I tried to use it, but Im probably doing something wrong - I don't see any option to see "Entity reference autofill" under "Additional behaviors". Can you, please, look at enclosed screenshots and guess where the problem is?

Miloš

jgullstr’s picture

The most probable reason is that you allow more than 1 value on the OG field. The module only works for fields with a cardinality of 1, since there is no clever way of knowing what data to consider for multi-value reference fields. I apologize for not having this documented, and hope this wont break your use case.

//Josef

milos.kroulik’s picture

Status: Needs review » Closed (fixed)

Yes, that was the reason. Unfortunately, you're also right in that it breaks my use case. It would be great, if we could modify the module's behavior in case where there are multiple values (of some data type) present. For example, I would like to use this module to autofill user's area as sum (total) of areas corresnponding to groups he/she is member of.