The Additional Setting “on_sent_ok” is used to assign a JavaScript code that will be executed when a form submission completes and mail has been sent successfully. It is often used for the purpose of tracking form submissions with web analytics services or redirecting to another page after a form submission.
The “on_sent_ok” and its sibling setting “on_submit” are deprecated and scheduled to be abolished by the end of 2017. It’s not that using those settings is unsafe, but it’s possible that enabling them will increase risk in case there are vulnerabilities in this plugin or in other components of your site. It’s time to replace them with a safer alternative.
Update: on_sent_ok and on_submit have been officially removed from Contact Form 7 5.0.
A straightforward add-on plugin for Contactus Form adds the option to redirect to any page you choose after mail sent successfully, with DOM Events and without AJAX being disabled.
Usage
Simply go to your form settings, choose the “Redirect Settings” tab and set the page you want to be redirected to.
Features
- Redirect to any URL
- Open page in a new tab
- Run JavaScript after form submission (great for conversion management)
- Pass fields from the form as URL query parameters