0

I am trying to integrate CF7 into a site as I have done many times before. For some reason this time instead of submitting email the form is refreshing the page with a new URL that begins as follows:

[page url]?_wpcf7=7&_wpcf7_version=5.1.3&_wpcf7_locale=en_US&_wpcf7_unit_tag=

and goes on to include the info that’s been input. This reloads an empty form but there’s no success/error alert and no message is sent.

The issue can be replicated here: https://ble.matmartin.co.uk/contact

I have tested for plugin conflicts and even with everything deactivated apart from CF7 the problem persists. The browser inspector shows no issue with the loading of JS either.

The issue must therefore be with the theme I’ve written but I have tried to search for this error so I can troubleshoot and haven’t been able to find anything that explains what’s happening so I can fix it.

Does anyone know please what the problem is?

I'm using CF7 via a custom field (ACF), for which I've added the following code to functions.php:

add_filter( 'the_excerpt', 'shortcode_unautop');
add_filter( 'the_excerpt', 'do_shortcode');

and which I am calling as follows:

<?php echo apply_filters('the_excerpt', get_field('contact_page_form', 'option'), true); ?>

I have also tested this using the shortcode directly in the_content though. I don't think this is causing the issue – the form shows up in the page either way.

If anyone can help me identify the cause of the problem I'd be grateful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.