Stay on the page with jQuery validate form plugin
Hi

I use the "validate form plugin" to control my form, but when I click on the submit button, I'm redirected because of the PHP file on the "Form sent" page. Everything works fine except that.
How to stay on the same page after validating my form please ?
Here an extract of my code :
PHP FILE
<?php
- [I HAVE CUT THE CODE]
-
if(mail($to, $subject, $message, $headers)){ echo "Form sent"; } else { echo "Form not sent"; } ?>
JQUERY FILE
$("#form-contact").validate({
- [I HAVE CUT THE CODE]
submitHandler: function(form) { $('.btn-validate-group:visible').hide(); $('.message-success').fadeIn(1000); form.submit(); } });
HTML FILE
<form id="form-contact" action="php/traitement.php" method="post"></form>
Thank you in advance.