After send mail contact form 7 submit the form

You want to know how to submit a Contact Form 7 form after sending a mail using the "Send Mail" option.

By default, Contact Form 7 will not submit the form after sending the mail. However, you can achieve this by using a combination of JavaScript and the on_sent_ok hook provided by Contact Form 7.

Here's an example of how you can do this:

  1. In your Contact Form 7 form, add the following code in the "Additional settings" section:

    on_sent_ok: "javascript:document.getElementById('my-form').submit();"

    Replace my-form with the actual ID of your form.

  2. Make sure to add the id attribute to your form element:

    <form id="my-form"...>
     <!-- your form fields here -->
    </form>
  3. Save your changes and test your form.

When the form is submitted and the mail is sent successfully, the JavaScript code will be executed, which will submit the form again. This will allow you to perform any additional actions or redirect the user to a different page after the mail is sent.

Note that the on_sent_ok hook only works when the mail is sent successfully. If there's an error sending the mail, the hook will not be executed.