Topic: Material Select Set selected value

hetal free asked 7 years ago

I have Material Select List and I want to set selected value by using javascript or JQuery but material select list not showing that value

Rafael Pujol free answered 5 years ago

var element = $("#youselectId")


you can  remplace the number 2 with the item id that you want select

var changeSelectPickerValue = function (id, value) {

var element = $("#" +id)


Furey free commented 5 years ago


dejan.mauer pro answered 6 years ago

Great! This solved my issue.

It's possible. Here you can find a solution

dejan.mauer pro answered 6 years ago

I am struggling with the same problem... I have this HTML:
<div class="col-md-4 input-field">
	<select id="selectDiscount">
		<option id="selectDiscountNone" selected value="None">Not specified</option>
		<option id="selectDiscountMoney" value="Money">in money</option>
		<option id="selectDiscountPercent"value="Percent">in percent</option>
How it is possible to select, for example, second option as with JavaScript?

Michal Szymanski staff answered 7 years ago

Can you provide your sample code?

Please insert min. 20 characters.


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



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No