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;            
       }
 });

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .