Topic: mdb5 AutoComplete get selected value

Odhran priority asked 3 years ago


I display a list of items in the autocomplete - each have an Id and Name.
I display the name. How can I get the Id based on the Name that the user selects. Using $("autocomplete").val() returns the selected text not the Id. Thanks


Marcin Luczak staff commented 3 years ago

Hi,

Could you please create a snippet with your code? You are saying you are using MDB5 autocomplete but $("autocomplete").val() references MDB4 jQuery autocomplete.

Keep coding, Marcin



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: MDB4 4.19.2
  • Device: laptop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No