Topic: Dynamic initializatino for select

PiotrMD priority asked 1 year ago


Currently for dynamically added "input" element in the form there is initialization available as shown on the md page:

document.querySelectorAll('.form-outline').forEach((formOutline) => {
  new mdb.Input(formOutline).init();

Is there similar initialisation for "select" element added dynamically via javascript ?

Mateusz Lazaru staff answered 1 year ago

yes, there is a way to initialize dynamically added select:

const mySelect = new mdb.Select(document.getElementById('mySelect'), options)

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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.2.0
  • Device: Dell Laptop
  • Browser: Edge
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No