Topic: Autocomplete - Display Value
sergiojaviercaz premium asked 3 years ago
I have an array of objects with item_Id and item_description. I want to show the item_description and also use it as search criteria, but when user selects one option, I need to get the item_id. I looked for that in the documentation but couldn't find a way to get it.
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: Premium
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.9.0
- Device: PC
- Browser: Chrome
- OS: W10
- Provided sample code: No
- Provided link: No
Michał Duszak staff commented 3 years ago
You might want to use Select with search for this purpose, as it stores value as the attribute https://mdbootstrap.com/docs/standard/forms/select/#section-search
Autocomplete is an text type input, which stores only displayed value. Otherwise you have to make a custom script.