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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.