Alexis Comte priority asked 1 year ago

Expected behavior

Invalid form should not be able to close dropdown

The classic bootstrap validation should be working

Actual behavior

I have created a dropdown with a FORM. Inside the dropdown form, there is a required field, when I try to validate the form with no value in the field, I get an error but the dropdown closes and the form diseappear. This should not happen while the form is not validated

also, I have tried the classic bootstrap validation and copied the code from

but the code is not working, why ?

Resources (screenshots, code snippets etc.)

Test page available on

Mateusz Lazaru staff answered 1 year ago


you'll need to add data-mdb-auto-close="outside" to the dropdown-toggle button. Thanks to this option, clicking the button or any child of the .dropdown-menu will not call Dropdown.hide() method.

If you want to call this method manually after succesful validation of the form content, see this snippet:

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.0.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes