Can I get the taxonomy_container support for Entity Reference field type ?

Comments

chi’s picture

Component: User interface » Miscellaneous
Status: Active » Postponed (maintainer needs more info)

What kind of support you are expecting? Does Entity reference field use any hierarchy?

ishara’s picture

Entity reference -> Target Type -> Taxonomy Term

Entity reference type can be setup as Taxonomy Term.

I would like to use Entity reference instead of Term Reference because Entity Reference Terms can be filter with Views.

Thank you

chi’s picture

Project: Taxonomy container » Entity reference
Version: 7.x-1.1 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

It isn't possible because this module is called Taxonomy container. Let's move it to Entity reference issue queue.

chi’s picture

Title: Support Entity Reference type » Support optgroups in select list
DIMSKK’s picture

Issue summary: View changes

Optgroups are still not supported... Is there any way I can do this?

mrpeanut’s picture

I'm also looking for a way to get optgroups in an entity reference select field. Anyone stumble across a method of achieving this?

jgullstr’s picture

Status: Active » Needs review

Here's a patch that adds optgroups to the views selection handler. To use, group an entityreference view by desired field, then use that view on the reference field.

I have not tested this thoroughly, and I suppose it could be coded more elegantly.

jgullstr’s picture

the patch

jgullstr’s picture

Status: Needs review » Needs work

Sorting does not seem to work correctly.

jgullstr’s picture

Status: Needs work » Needs review

Nope, turns out my view was configured badly.

gravisrs’s picture

$rows = array_combine(array_keys($result), $this->view->result);

In some cases this line behaves wrongly. $result is sorted differently than $this->view->result if you use any post-query result altering modules like:
- views PHP (filtering / sorting / grouping)
- computed field (filtering / sorting / grouping)
etc.

megachriz’s picture

chris matthews’s picture

Status: Needs review » Needs work

$rows = array_combine(array_keys($result), $this->view->result);

In some cases this line behaves wrongly. $result is sorted differently than $this->view->result if you use any post-query result altering modules like:
- views PHP (filtering / sorting / grouping)
- computed field (filtering / sorting / grouping)
etc.