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.

0

Try like this

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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