I am using Jquery autocomplete and array as source and I want to display the label instead of the value because i am storing the value in a different variable where it is not displayed in the form. But this is what they say in the documentation:
The label property is displayed in the suggestion menu. The value will be inserted into the input element when a user selects an item.
Sample images
Searching:
Selecting:
Codes:
Array:
var searchcustomer_arr = [{label:"ASD CUSTOMER",value:1},
{label:"Customer 2",value:2}]
Javascript:
$("#customer" ).autocomplete({
source: searchcustomer_arr,
minlength: 2
});