Contact Form 7 Custom Post Action

I found this thread here discussing this topic: https://stackoverflow.com/questions/14177844/how-to-change-form-action-url-for-contact-form-7

However it seems that using the following code does not work as the contact form is submitting with ajax back to CF7 and ignoring the post action.

add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
function wpcf7_custom_form_action_url(){
    return 'www.myposthandler.com';
}

Is there a way to disable the ajax submission?

Site where this is happening: https://daintreecapital.com.au/ the newsletter subscription form in the footer is what I am trying to alter.

1 Answer
1

As per the CF7 Documentation, you can disable AJAX form submission by placing the following code in your wp-config.php

define('WPCF7_LOAD_JS', false);

Leave a Comment