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

jQuery Form Validator OnSuccess with Alertify not working #734

Open
mittultechnobrave opened this issue Mar 5, 2019 · 0 comments
Open

Comments

@mittultechnobrave
Copy link

I am using jQuery Form Validator with Alertify JS and I am using below code to check if my form successfully validated or not.

onSuccess : function($form) {
  alertify.alert('a callback will be invoked on ok.').set('onok', function(closeEvent) { 
    return true;
  }); 
  return false; // Will stop the submission of the form
},

Here what I am trying to do is, if I press OK From Alertify then my form should be submitted.

But as of now, if I remove return false; then my Alertify not showing and my form gets submited.

I also tried to put $('#my-form-id').submit() inside return true; but yet its not working.

Basically I just want to show my Alertify before form gets submitted just to notify the user with my alert box. But it seems above things not working for me correctly.

Here is the jQuery Form Validator configuration documentation which I have followed.

Can someone guide me what I am doing wrong here ?

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

1 participant