1
I’m developing a function in Jquery that uses the component Autocomplete where I search the company name and change the company name in another field.
Example:
Field1 (autocomplete) passes information to Field2 when it is clicked on the option shown in the Autocomplete.
My problem is: Knowing what value was clicked and the click event to pass the information to the other field.
Follows code snippet:
var empresas = ['teste','teste2'];
$( "#e" ).autocomplete({
minLength: 2,
autoFocus: true,
source: empresas
});
select: function (e, i) {
 console.log(i.item.val); }
, have tried?– Marconi
I had not tried because I did not know what the function was to catch the event, and had not found a solution, it worked this exchanging val for value
– Bruno Folle
Glad I could help, if clicking run down there will see working.
– Marconi