Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirtyForms does not work properly when used with submitHandler() method of jQuery Validate #127

Open
ivansammartino opened this issue May 31, 2018 · 2 comments

Comments

@ivansammartino
Copy link

Hello,
I'm using popupar jQuery Validate to validate my forms. I also need to use the submitHandler() method because I do a couple of actions before actually sending the form.
In this scenario, DirtyForms is triggered even on a normal submit form, when it shouldn't be.

Here is a jsFiddle.

Please, any solution?
Thanks a lot! :-)

@PlippiePlop
Copy link

You need to set it to clean first:

 $('form[method="post"]').dirtyForms('setClean');
 form.submit();

@ivansammartino
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants