'How do I bind data for autocomple to input fields in materialize?
I'm using materialize framework for a personal project and following the documentation I was able to add the data to autocomplete my form fields.
In this form, the user will fill in data about his vehicle.
$('input.autocomplete').autocomplete({
data: {
"Verde": null,
"Rojo": null,
"Azul": null,
"Honda": null,
"Toyota": null,
},
limit: 20, // The max amount of results that can be shown at once. Default: Infinity.
onAutocomplete: function(val) {
// Callback function when value is autcompleted.
},
minLength: 1, // The minimum length of the input for the autocomplete to start. Default: 1.
However, while filling in data about the vehicle brand, the autocomplete will suggest "rojo". How do I separate data from specific fields?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|