Good afternoon (o;
As my project already uses autocomplete from jqueryui I give it a go as well with the editor..
But I am stuck what to exactly return from the ajax call.
Got this framework I've found here:
label: "Artikelnummer",
name: "Artikelnummer",
type : "autoComplete",
minLength: 2,
opts: {
source: function (query, result) {
$.ajax( {
url: '/inc/get.products.php',
dataType: 'json',
success: function ( data ) {
result ( $.map( data, function (item) {
console.log(data.data);
return {
label: data.data.number, << no clue yet (o;
value: data.data.number << no clue yet (o;
};
}
)
)
}
});
}
}
The PHP code just returns an array with all products availabe, and the editor autocomplete should fill then two fields automatically when selected...
So my simple question..what exactly do I have to return in the ajax call to autocomplete so it displays the product list matching they typed input?
I'm not that JS guru (o;
thanks in advace
richard