Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Chosen break multiselect widget
Comment | File | Size | Author |
---|---|---|---|
break multiselect widget | 4.81 KB | Xaber |
Comments
Comment #1
Cyclodex CreditAttribution: Cyclodex commentedNeeds more info here.
How it runs with latest dev version ?
Did you apply chosen to the multi select field already triggered by multiselect ?
Are you sure Chosen is the problem, and not multiselect? Why ?
Needs more info! Thanks
Comment #2
Cyclodex CreditAttribution: Cyclodex commentedComment #3
johnvSame problem here, using latest versions:
- Chosen 7.x-1.0+17-dev (2012-Aug-09)
- multiselect 7.x-1.9
IMO Chosen should have an option to amend only certain widgets, not all.
Comment #4
Hydra CreditAttribution: Hydra commentedWell I believe it is a pretty odd use-case to use chosen and multiselect at once. However, you can solve this issue by adding the following few lines to the "Apply Chosen to the following elements" field at admin/config/user-interface/chosen
I dont think we need to add some kind of fallback to chosen for this, this quick fix should do it, when you really use both.
Comment #5
Hydra CreditAttribution: Hydra commentedSince #2024581: Unnecessary loading of Chosen files on pages without any select boxes. has been commited, this shouldn't be an issue anymore, because chosen only is attached to select fields.
Comment #6
johnvThanks Hydra,
ITMT I have disabled Multiselect, since Chosen does the proper thing. But you 'patch' might help others. Perhaps it can be a default setting.(removing a line is easier then inventing one)
Comment #7
System Lord CreditAttribution: System Lord commentedI agree. I don't see much use for both multiselect and chose, except that I need to limit the "number of values." I have a field for states and fifty states (fields). My users are only permitted to select four states and no more. Using Chosen alone doesn't provide for a limit.
By the way i actually did add those two lines from #4 and it froze my entire site, or any page that was using Chosen. I had to uninstall it and do a complete reload.