mdb5 AutoComplete get selected value


Topic: mdb5 AutoComplete get selected value

Odhran pro premium priority asked 4 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 4 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

Open

Specification of the issue
  • User: Pro
  • 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