function autoCompleteItems() {
var item = document.getElementById('id_ap');
var singlePresetOpts = new Choices(item, {
    searchPlaceholderValue: 'Search for Animal',
    placeholder: true,
});
}
document.addEventListener("DOMContentLoaded", function(event) { 
    autoCompleteItems();
});