views:

28

answers:

2

Hi, I am using jQuery; I have a select box the options of which are populated from a json object. But because the database is potentially incomplete, I would like to offer the user the ablity to enter a custom value. Most combobox solutions, I have been looking at are malfunctioning one way or the other. What are alternative solutions in this case?

A: 

You can use the jQuery Editable Combobox plugin for that.

jQuery Editable Combobox is a jQuery function that allows you to transform any tag into editable combobox.

This is done by adding a new element to carry the value entered by the keyboard. This will only work on select elements. Any other elements this function will be applied to will be ignored.

Sarfraz
It needs another field to set a value; Space is really restricted, however i will put in that as an option;
RisingSun
Regret earlier comment, I was wrong. Fits my app very well. You CAN type directly into the select box field.
RisingSun
A: 

Maybe an auto-complete box? Where the user can start typing and your options are presented, but a different value can be typed in as well. Like:

QuickSelect

The QuickSelect plug-in can change your <select> box into one of these. http://github.com/dcparker/jquery_plugins/tree/master/quickselect

Adam
Um, tried this now. But populated options in my select box are numericals, so autocomplete like functionality is almost useless. It would have worked if there was a option to show dropdown irrespective of input match. Thanks
RisingSun