Reply To: Form submits before it is validated

#10035533
Support
Keymaster

Hello ts,

I saw you are preventing the submit of form and doing an ajax. This way you need check the validation of form with checkValidity() function:

if( $("#orderform")[0].checkValidity() ) {
    console.log('submited!');

    // ajax code
}

We hope this helps!

Please try that and let us know if you need further assistance.

Kind Regards,

Rodrigo.


If you are satisfied with Porto HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads