Topic: Autocomplete error: Uncaught ReferenceError: autocomplete is not defined

abbynormaled priority asked 5 years ago


I get the above error when trying to use autocomplete. Here is the code:
var projects = [
{ 
'Label': '[COPY THIS CARD] - CONTRIBUTORS', 
'Value': '5b1eb3116d71a836ea99bfd5' 
}, 
{ 
'Label': 'Next Brainstorm Meeting Notes/Agenda', 
'Value': '59fca601c55c715de3baa221' 
}, 
{ 
'Label': 'Collaborator Introduction', 
'Value': '5aa6d297302edb694464abb6' 
}]
 
$(document).ready(function(){
   $('#workEntryProject').mdb-autocomplete({
     data: projects
   });
}
<input type="search" id="workEntryProject" class="form-control mdb-autocomplete">
<button class="mdb-autocomplete-clear">
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg">
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
<path d="M0 0h24v24H0z" fill="none" />
</svg>
</button>
<label for="form-autocomplete" class="active">Project</label>

abbynormaled priority commented 5 years ago

Additional info: I switch to using the default jquery autocomplete function, and *that* is working.

Bartłomiej Malanowski staff commented 5 years ago

what's the error?


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags