Topic: Programmatically select multiselect dropdown items
garrithsteyn pro asked 7 years ago
Hi
How can I programmatically select multiselect dropdown items within client script?
It doesn't seem to work when setting the option tag to selected.
Cheers
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Closed
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags
Jakub Strebeyko staff commented 7 years ago
Hi there, Could you please provide some more context for the way you'd like to use multiselect? Adding theselect
attribute to theoption
tag should provide you with multiple options being selected on page load. Regards, Kubagarrithsteyn pro commented 7 years ago
Hi My requirement was to auto select multiselect items after an ajax call. I managed to resolve it by editing mdb.js and setting the id of each list item and trigger the click event for each required option.