Recently I had a struggle with jQuery Multiselect Widget.
As general it is really flexible and easy to use, but I was willing to have a list with abbreviation of all selected values (separate with commas)
More or less it should look like that at the end:
Preconditions:
1. JQuery library CSS and JavaScript
2. Multiselect CSS and JavaScript
More information about Multiselect Widget here
First the easy part the HTML
$(function(){ $("#myMultiselectId").multiselect({ close: function(event) { //Get all selected values from the drop down list var array_of_checked_values = $(this).multiselect("getChecked") .map(function(){return this.value;}) .get(); var dataSet = {}; dataSet[this.name] = array_of_checked_values; }, selectedText: function(numChecked, numTotal, checkedItems) { var returnString = ''; for(var i=0; i