I've a problem where I have not found an example yet and my attempts to solve this by myself have not been fruitful:

I have two content types where I need to reference the (multiple) entries for a field in the first type in my second type. Content A has a simple text field that can have an unlimited number of values. In Content B I want to show a drop down list with entries from Content A of a specific node.

I use the Entity reference module in Content B and have defined an Entity reference view that generates the list of items. This view uses the context filter of the referenced node id, so I really only get the multiple items that are set for the specific nodes. In the view preview it seems to generate correctly - I get a list of divs with "entry1" "entry2" ... each on a single line.

In my dropdown however, I only see the items "None" and "last entry" ... all others in between are not showing.

I've tried to use Multiple Field Settings set to "Display in same row". This leads to a single entry in the drop down called "entry1, entry2, ..., last entry", which defeats the option of selecting the one I want to set.

Maybe I've gone way too complicated here - so any pointers would be most appreciated. Maybe it's more complicated than that or just not possible?

Thanks for any input. Best, Georg

  • If you could describe the overall goal a bot more, we could maybe suggest an alternative depending on what you are trying to achieve. In general, entityreference provides (as the name says) references to an entity, not to the various values of a field in that entity. I'm guessing that entityreference has some DISTINCT option running. – Paul Nov 18 '14 at 10:21
  • Paul - thanks for the follow up. My introduction was probably too lengthy. This is my core goal: I want to make field entries of a specific node of content type A (nid provided) available as items in a select list in content type B, which is related to this specific node. – hobbes_VT Nov 18 '14 at 15:03
  • I got that, but I think it's not possible as entityreference isn't designed to do that. Still, I'd be interested in the purpose of this construction (kind of application) because I'd like to believe there's a better way to do that. – Paul Nov 18 '14 at 15:08
  • The immediate purpose is in connection with the Registration module, which I used to implement a checkout system. So I have a content type "Item" that can be checked out by creating a registration. I like the registration module over other options (e.g. MERCI) because it directly links each item to a check-out history. Now instead of creating two item nodes of equipment where I have more than one, I allow the "ID/Tag" field of my item node to have multiple entries. Now when I check out one of these, I'd like to record which of the tags is going out. A list of IDs for this item would be best. – hobbes_VT Nov 18 '14 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.