I was looking for jQuery UI Autocomplete because I needed on a <input />
but the problem is that I need to pass the id of the name completed. Let me explain:
I have an array of names:
$names = array(
array('name' => 'John', id => '1'),
array('name' => 'Sarah', id => '2'),
array('name' => 'Josh', id => '3)
);
And then, with AJAX, the input will be autocompleted with one name of the array but then, when I submit, I need the id and not the name. How can I manage?
Thanks in advance