Topic: Problem form select with stepper
ivan89 free asked 1 year ago
I put a select in my test stepper and I get errors in the console: Uncaught ReferenceError: mdb is not defined and other. I initialized with: const Select = new mdb.Select (document.getElementById ('mySelect'), options); Should I call some additional library in the body of the page? I currently have:
Thanks in advanced
ivan89 free answered 1 year ago
Dawid Wajszczuk staff commented 1 year ago
Hi. You just forgot to include the actions for the second pair of buttons in your JS. Also adding
type="button" to your buttons should help. And there was no unique ID in 3rd step (it was duplicated) so I also have changed that. Here is the snippet https://mdbootstrap.com/snippets/standard/d-wajszczuk/3175838
Dawid Wajszczuk staff answered 1 year ago
It looks like you have all the necessary imports. One thing that I have noticed is that you try to double initialize the Select, with
Select class and then via JS. Choose one option. Here is the snippet with what you are probably trying to accomplish https://mdbootstrap.com/snippets/standard/d-wajszczuk/3155500. Copy and paste this to the
body of your project and change the language to fit your needs. It should work fine.
qcoliveros premium commented 3 days ago
Field validation is not working in this example, i.e., field outline will be green if no validation error or will be red if have validation error.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 3.8.0
- Device: PC
- Browser: Firefox - Chrome
- OS: Debian 10
- Provided sample code: No
- Provided link: Yes