Drupal select lists by default put hyphens into select lists as a crude way of showing taxonomy hierarchy. For example:
Africa
-Southern Africa
--Angola
--Botswana
-Western Africa
--Ghana
Europe
-Eastern Europe
--Albania
etc...
This breaks Chosen, because chosen selects based on word start, and treats the hyphens as word start (so it fails to match "Ango" with "Angola" because it treats the word as "--Angola").
Also, it looks awful.
You should replace the hyphens with , spaces or a combination, so that this module works with taxonomies that have a hierarchy.
Comments
Comment #1
Taxoman commentedComment #2
Taxoman commented#1368992: Chosen doesn't drop down with term reference field and taxonomy on nodes
Comment #3
shadcn commentedYou need to enable "Search also in the middle of words" on the config page.
Comment #4
playfulwolf commentedI kind of disagree with that - it should work even without this option
Comment #5
gtothab commentedWhat is the path to this setting? All I see in the Chosen settings is the selector box and a "minimum number of options"....
Thx
Comment #6
gtothab commentedNevermind, I found the settings. I did't have the dev version installed and those appear only on the dev version. HOWEVER, now my select list does not get the Chosen applied to it at all.
I have the 'apply chosen to this field' option selected from the field options and also have it listed in the Chosen configuration page.
This is a Taxonomy select list.
This appears to be my problem: http://drupal.org/node/1960370#comment-7259704
Comment #7
d_f commentedIf it's been designed to work like this, can it also be adjusted to save the term lineage as well?
Comment #7.0
d_f commentedfixed formatting
Comment #8
batigolixYou can find this option via:
Home > Administration > Configuration > User interface > Chosen
(admin/config/user-interface/chosen)
Comment #9
druplicate commentedIn my case I don't want to search in the middle of words.
I have a large taxonomy of numbers (4,000 terms) where I want to search from the beginning only so I don't get results like this:
If I want to search for 2.7...
I don't want: 5242.755, 236552.7, 12.78, and zillions too many more.
I do want to get results like: 2.7, 2.70, 2.765, etc.
Removing the dashes isn't easy (see this: http://drupal.stackexchange.com/questions/85011/how-to-get-rid-of-the-si...) but it's important I think.
The Taxonomy Container module improves the look but does not remove the dashes. This probably should be fixed in Drupal core (taxonomy module). I'd vote for moving that module's code into core and getting rid of the dashes altogether.