Hi,
I'm trying to configure the jQuery UI Autocomplete widget to send the 'id' attribute value to my controller instead of the 'value' attribute value (see below).
My code snippet is follows:
- $('#companyId').autocomplete({
- source: '${g.createLink(action: 'autocompleteSearch')}',
- minLength: 2
- });
My source JSON look like the this:
[{"id":1,"value":"Company A"},{"id":327,"value":"Company B"},{"id":2036,"value":"Company C
"},{"id":2142,"value":"Company D"}]
I'm sure this is dead simple to configure but I'm new to jQuery UI so any help would be greatly appreciated.
Thanks!