I'm at my wits end with this one because there doesn't seem to be anything viable for this.
I have tried using jQuery UI's autocomplete from SVN, which can be found here: http://jquery-ui.googlecode.com/svn/branches/dev/autocomplete/
But the total lack of (updated) documentation has got me as far as displaying a bunch of [Object]'s in my result list, with no clue how to format it.
I just want a simple autocomplete plugin that:
Allows me to return a JSON object that the plugin itself will parse
Allows me to specify a seperate inputField from the displayField so that the user sees "Stackoverflow Industries" but the input field is actuall "5", the companies id.
Obviously, does the basics that an autocomplete plugin will do
Thanks in advance..
I've written a small example using this plugin to answer this question. In this example, it's not a "JSON object", but an "option" object (yeah... don't ask...) that is handled by the plugin and the value of the option is stored in a hidden field while the text is shown in the textbox. The best thing to do is to have a look at the demo page and inspect the code to understand the options you can use. And why not extend the plugin to let it have the exact behaviour you want it to ? It's not that hard.
Anyway, just give a live example of what you need, and we'll try to help you :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With