I am wondering whether it\'s possible to add new values on the fly to a chosen.js multiselect (similar to how tagging works).
I\'ve seen in another SO post a user s
the documentation mentions this option:
Updating Chosen Dynamically
If you need to update the options in your select field and want Chosen to pick up the changes, you'll need to trigger the "chosen:updated" event on the field. Chosen will re-build itself based on the updated content.
with this.
$("#form_field").trigger("chosen:updated");
This can be combined with
// Add field
$("#form_field").append("");
$("#form_field").trigger("chosen:updated");
Adding this together to an example can be found at the jsfiddle: http://jsfiddle.net/E5X9x/