0

I'm trying to submit the form on ajax call. Before submit the form, I'm trying to validate it.

   $('#customerqa-form').on("click", "#customerqa-submit", function (event) {
                    event.preventDefault();
                   if ($("#customerqa-form").valid()) {
                        self.formSubmit();
                    }
                });

It's throws

Uncaught TypeError: Cannot read property 'call' of undefined

error.

If anything I want to change it.

Thanks.

1 Answer 1

0

Try like this

 $('#customerqa-form').on("submit", "#form_id", function (event) {
       if (!$("#customerqa-form").valid()) {
            return false;            
       }
 });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.