Topic: How we reset the form without triggering validation
Expected behavior All the elements in the form should go to original state and validation errors should not appear
Actual behavior Validation errors shown on the form
Resources (screenshots, code snippets etc.)
const form = document.getElementById('formNewTeamMember'); form.reset();
To reset the appearance of the form (for instance, in the case of dynamic form submissions using AJAX), remove the .was-validated class from the form after submission.
Best Regards, and Keep Coding
This topic is closed.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Premium
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.7.1
- Device: Mackbook
- Browser: Safari
- OS: Mac
- Provided sample code: No
- Provided link: No