jQuery-Smart-Auto-Complete
jQuery-Smart-Auto-Complete copied to clipboard
Working with ids?
With select boxes, the labels and the actual values of the options are decoupled so you can show a nice formatted text to the user and still get an id back to plug directly into the database. I couldn't find an easy way of doing that with your plugin?
You can use the resultFormatter
option to pass the formatted text to show (check the 7th example in the demo page). Then with the itemSelect
event you can get a value (or an id) to send back to the backend.
Did you try doing this? I think I looked at the source code and concluded I might end up with a problem. I need to be able to control it the other way around too, i.e. I need to be able to choose a certain id/value if the user presses a button.
In any case, it's not easy to do. :) I don't think it's a bug, just a suggestion for something you may want to improve on. I realize it depends on whether you're using the combo box for free form input or as a select box with a fixed set of values.