You can call the output via ajax and create an autocomplete list using the Vanilla Javascript AutoComplete
You will autocomplete the callback in Javascript:
function ShowModalRelMapaAeronave() {
$.ajax({
type: 'POST',
url: BASE_SITE + '/Projeto/Projeto/BuscarAeronaves',
data: { },
success: function (data) {
new autoComplete({
selector: '#TxtAeronave',
minChars: 2,
source: function (term, suggest) {
term = term.toLowerCase();
var choices = data;
var matches = [];
for (i = 0; i < choices.length; i++)
if (~choices[i].toLowerCase().indexOf(term)) matches.push(choices[i]);
suggest(matches);
}
});
$('#modalRelMapaAeronave').modal('show');
}
});
}
Here in the case I call the post in a route, I get the return and put in a txt of my html, so when it goes typing goes autocompleting. It is necessary to add the javascript and css library.
The route is responsible for making the query.