Topic: How can I get selected values from Multiselect?

SKQR01 free asked 4 years ago


Expected behavior I need to get selected values from Multiselect. Actual behavior I cant do this, because I dont know how. Resources (screenshots, code snippets etc.) I try get values with JQuery: $('element:selected').val() $('element:selected').text() But I do nothing


Mateusz Łubianka staff answered 4 years ago


@SKQR01

I created the snippet with example code. Check out the link: https://mdbootstrap.com/snippets/jquery/mateusz-lubianka/1516465?action=forum_snippet

If you click on the button, you will get the array with values in your console.

Best,



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: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.12
  • Device: Laptop
  • Browser: Opera
  • OS: Linux Ubuntu 18.04
  • Provided sample code: Yes
  • Provided link: No