Topic: On pressing cancel Button no validaion of the Page

gerdhuber pro asked 4 years ago

Expected behavior Hallo,

I don't want to validate my page when pressing the right cancel-button. On the attached image you see the result.

I hope, this is possible.

Thank you

Gerd Actual behavior

Resources (screenshots, code snippets etc.)enter image description here

MDBootstrap staff commented 4 years ago

Hi gerdhuber,

I would like to help you. Can you please copy your code of this form to our snippet environment? I will modify it to just clear your form instead of checking if it is valid. Best Regards, Piotr

gerdhuber pro commented 4 years ago

Hallo Piotr,

thank you. I have create the snippet.

MDBootstrap staff answered 4 years ago

Hi gerdhuber,

I checked your code. In your HTML, your clear input have declared type="submit". To change the behaviour of the form simply change that to the type=button. In this example, I can not check your javascript functions but this change should definitely help with this issue.

I forked from your snippet and fixed the HTML code.

Best Regards, Piotr

gerdhuber pro commented 4 years ago

Thank you Retardation gerd


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



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.8
  • Device: PC
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No