How to get success or failure message on form submission in Jquery Validation plugin submitHandler

27 views Asked by At

I have sorted everything else out. But when I submit form my php page will respond with if form data is successfully saved or not. How can I handle that. My submitHandler is as bellow:

submitHandler: function(form) {
          alert("Successfully submittable");
          form.submit();
//After this page directly refreshes. I want status message shown first then it can refresh //page.
        }

I have set up all parameters in form like-

<form class="row g-3" id="myid" action="add_new.php" target="_self" method="POST">

So do I need separate ajax call in submit handler to submit. Any ideas how to handle this?

0

There are 0 answers