When using chosen on a multi-level hierarchical select, one doesn't see the parents representing the children.

Eg, a regional based taxonomy would have Melbourne for Victoria Australia and for Florida, USA.
Searching for 'Mel' would not show you if the result was for Victoria or Florida.

A simple solution would be to show the results as follows:

  • --Melbourne (USA/Florida)
  • --Melbourne (Australia/Victoria)

Note that searching for Florida would then bring up all children results for Florida (which is normally what one expects).

I could provide a patch for this functionality if required. I just want to see if another implementation is worthwhile and get more input from the community before I begin.

Comments

summit’s picture

Hi, this would be great add-on for userfriendlyness!
greetings, Martijn

dynamicdan’s picture

Quick update.. I am not really in a position to provide an update/patch for this functionality.... hoping that others can pick up the ball. Note that the dependency for 'contains vs starts with' has been resolved so that searching for 'ourne' or 'Mel' would work in the above example (if '--' is prepended).

Cyclodex’s picture

Ok, so do we want to mark this fixed ? Or do you need any further changes ?

Cyclodex’s picture

Assigned: Unassigned » Cyclodex
dynamicdan’s picture

We need the parents of the taxonomy terms displayed in brackets next to the results (visual change). It may questionable if these new parent terms are also searchable.

BigBrother2010’s picture

Anything new about this feature ?

dynamicdan’s picture

Nothing new, still needed.

My original proposal with parent terms in brackets would be a good start. Perhaps safest to implement them without being searchable for now, especially when one has massive hierarchical lists. We may also need to truncate/trim the parents given that there could be on average at least 5 with long names...

Melbourne (Aus/Vic)

Cyclodex’s picture

Sorry, I do not have a lot of time right now...

Patches are always welcome.

luo8’s picture

Hello,
this is really necessary feature,is there any plan for its implementation?
Thanks a lot

hydra’s picture

Status: Active » Closed (duplicate)

Their has been some progress in an other issue, addressing the visual change of hierarchical select items, see #2051133: Option to show item hierarchy in every item from the list(select)
I will close that as an duplicate, since the other issue already has a patch. Thanks everyone for brainstorming on that. Patches (in the other issue) are still very welcome!