0
I have this jquery
<script>
$(document).ready(function($){
$('[id="franchise"]').autocomplete({
source: "/ajax_calls/search/",
minLength: 3,
open: function(){
setTimeout(function () {
$('.ui-autocomplete').css('z-index', 99);
}, 0);
}
});
});
</script>
which performs the autocomplete function, taking the data from the "/ajax_calls/search/" url. This URL, has the data in list form, as follows:
['OPCAO 1', 'OPCAO 2', ...]
And everything works normally... search the data correctly and bring in the autocomplete field..
But now I changed the page and it is bringing me the data in a slightly different way. It brings all the information inside Objects:
{
"objects": ['OPCAO 1', 'OPCAO 2', ...]
}
With this change, the autocomplete has stopped working.. How can I adjust my jquery to be able to read this new data provision?
Man, I would’ve taken you up on that.. But I realized now that actually the autocomplete is bringing ALL the content of the page and is not 'filtering' by what I write in the field.
– Vinicius Bussola
You said you’re returning the object
– Sam
This... brings the whole object. And not just the items that match the typing
– Vinicius Bussola
Edited response. Now it should work
– Sam
I added a second form that I think is even better because it doesn’t put too much on the server.
– Sam
Good!! Thank you very much
– Vinicius Bussola