Hey! I'm using Awesomplete on a search form. I need to display the Label in the user visible input field but send the value on submission. Right now the form submits the label which won't work.
Is this possible with Awesomplete?
My code looks something like this...
let area = document.getElementById("area");
new Awesomplete(area, {
list: [
{
label: "New York",
value: "6648"
},
{
label: "California",
value: "6649"
}
],
replace: function(suggestion) {
this.input.value = suggestion.label;
}
});
Hey! I'm using Awesomplete on a search form. I need to display the Label in the user visible input field but send the value on submission. Right now the form submits the
label
which won't work.Is this possible with Awesomplete?
My code looks something like this...