• Resolved Yuval

    (@yuvalsabar)


    Hi,

    I’m a plugin developer, and one of our plugin is an add-on for CF7 – Contact Form 7 Redirection.

    We are looking for the best way to perform redirect when the form is not using ajax. We know about wpcf7_mail_sent hook, but we do not know what is the best method to check if CF7 is using ajax upon submission or not.

    We’ll be happy if you can advice us.

    Yuval.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    For redirection after a submission, wpcf7_mail_sent isn’t recommended to use. Use wpcf7_submit instead.

    Contact Form 7 uses the REST API for its AJAX submissions, so you can use WPCF7_Submission::is_restful() to test if the submission is AJAX.

    Thanks for creating the nice add-on ??

    Thread Starter Yuval

    (@yuvalsabar)

    Thanks! That’s exactly what we need.

    We’ve added support for non-ajax browsers and we’ll update tomorrow after some QA.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirection for the Non-Ajax Cases’ is closed to new replies.