Topic: Multiselect checking boxes does not add "selected" to option tag

haol04 priority asked 1 week ago


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.) Multiselect tag GUI Console output Code for the select tag


Kamila Pieńkowska staff answered 1 week ago


I was not able to reproduce the described behaviour. Here is a snippet that demonstrates value array being returned when you click a button: https://mdbootstrap.com/snippets/standard/kpienkowska/6415603


haol04 priority answered 1 week ago


- -- ---

Re-uploading images as they're not shown to me



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • 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