Topic: Multiselect checking boxes does not add "selected" to option tag
Expected behavior When items checked on multiselect form, it is supposed to add "selected" attribute to the corresponding option tag, so that the selected values can be collected and passed.
Actual behavior Selecting any item, (one, two, all items), won't change the option tags. Thus, $('#id_for_multiselect').val() returns an empty array. Screenshot shows the select tag was initialized, and after checking some options, still the option tags are not "selected"
Note: when "multiple" attribute is removed (single-select), it works normally; .val() returns the value of selected option as expected.
Resources (screenshots, code snippets etc.)
haol04
pro premium priority answered 12 hours ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 8.2.0
- Device: Windows laptop
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No