Search code examples
wordpresscontact-form-7

How to disable AJAX sending method in Contact Form 7 and keep other JS options like validation


I would like to use wpcf7_form_action_url filter and change action in form. To be able to do this, I need to disable the AJAX which is used when submitting the form

define('WPCF7_LOAD_JS', false) is not a solution because WPCF7 AJAX is packaged into an entire JS flag - so this will also turn off JS validation


Solution

  • if WPCF7_LOAD_JS JS is disabled, it will take the input to the server, validate and return to the form and show the errors. So, I think you not losing any validation functionality when submitting the form.