I have an input field (text) that I want to perform autocomplete on with multiple names. It acts like the To: field in Gmail, with the user typing in a name and hitting enter and continuing. The problem is that I have a list of names and that's what gets added to the input field and once you submit, as far as I know, only the field string gets sent to the server. The problem is when there are two people with the same name, so: John Smith, Bob, John Smith might be inputted and that string will get sent to the server.
On the backend, all users have a unique id. Is there any way I can have the users' names be the autocomplete source but have their ids sent to the server?
I'm using jQuery 1.5.1 and this plugin: jQuery UI Autocomplete