The combobox demo uses the base select element as the backup storage for the autocomplete widget. I would not recommend this for a form in which you allow the user to enter whatever they want.
However, you can emulate the combobox effect yourself without any problems:
var $input = $("#tags").autocomplete({ source: availableTags, minLength: 0 }).addClass("ui-widget ui-widget-content ui-corner-left"); $("<button type='button'> </button>") .attr("tabIndex", -1) .attr("title", "Show All Items") .insertAfter($input) .button({ icons: { primary: "ui-icon-triangle-1-s" }, text: false }) .removeClass("ui-corner-all") .addClass("ui-corner-right ui-button-icon") .click(function() { // close if already visible if ($input.autocomplete("widget").is(":visible")) { $input.autocomplete( "close" ); return; } $(this).blur(); $input.autocomplete("search", "" ); $input.focus(); });
Basically, this is the default behavior for the autocomplete widget, as well as a button that displays all the options.
Thus, the support field is an input element, and you can take user input when submitting the form and add it to the source next time.
Here is a working example: http://jsfiddle.net/andrewwhitaker/CDYBk/1/
source share