I'm developing a function in JQuery that uses the Autocomplete component where I search for the company name and change the company name in another field.
Example:
Field1 (autocomplete) passes information to Field2 when the option that appears in Autocomplete is clicked.
My problem is: Knowing what value was clicked and the click event to pass to the other information field.
Follow the code snippet:
var empresas = ['teste','teste2'];
$( "#e" ).autocomplete({
minLength: 2,
autoFocus: true,
source: empresas
});