Hi,

The chosen module is great, I use it a lot when using select list fields.

The feature that I am missing, is that the order that you select items is not saved.
I don't know if this is caused by the Drupal select list field type or by the Chosen formatter...

When I use Autocomplete Deluxe as a widget (and not the default Drupal select list) the order of selecting items is saved.
You can not reorder them by dragging but you can remove items from the selection and add them again in the order that you want.

Comments

maxplus’s picture

I think that the difference between the Chosen module and the Autocomplete Deluxe module in my case could be that I use Chosen in combination of a select list widget and Autocomplete Deluxe is some kind of autocomplete widget.

I have a feeling that autocomplete widgets do save the order of items in their list.

efruin’s picture

I also need the order in which items are selected to be saved, but unfortunately the Chosen library does not (and will not) support this functionality (per their issue queue https://github.com/harvesthq/chosen/issues/1847). However, I was able to find a Chosen plug-in that allows you to get and set the order of the items that are chosen. You can find it here: https://github.com/tristanjahier/chosen-order. I'm going to try to use a hidden form field to pass this info back and forth from server to browser and see if I can get it to work. Would love to have this option baked in to the Chosen module. Perhaps a better coder than me can figure out a way to make that work.

markisatacomputer’s picture

I had this issue and ended up writing a module to solve it:

https://github.com/markisatacomputer/chosen_order

In case it's useful...