• I’m trying to fix the issue with the form. When I add the recaptcha the form stops submitting. From what I see the plugin is not adding the code. I remove the recaptcha integration and it submits without any issues.

    I tried removing the plugin, reinstalling it, uploading the recaptcha keys again and it still doesn’t work.

    How can I fix this?

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

    (@takayukister)

    Where can we see the website in question?

    Thread Starter Meli Gomez

    (@meli20025)

    this is the site: https://wtwconsultancy.com/

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter Meli Gomez

    (@meli20025)

    @takayukister plugins installed:

    • Contact Form 7
    • WP Cerber Security, Anti-spam & Malware Scan
    • WP Change Default Email
    • WP Mail SMTP
    • Yoast SEO

    Theme: Self-developed theme, which I use on another site and on that one the recaptcha works ok.
    PHP version on server: 8.3 FPM
    WP version: 6.6.1

    I have the same version on other sites and it adds the recaptcha code and the form works fine.
    That’s why I can’t find a way to fix it.
    Thanks for your help.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Try switching to the default theme, deactivating all plugins excluding Contact Form 7, WP Mail SMTP and Yoast SEO, and clearing all cache data.

    Why you are advised to deactivate plugins and switch to the default theme.

    Thread Starter Meli Gomez

    (@meli20025)

    @takayukister Thanks for your reply.
    II’ve been looking and found that the error occurs because it doesn’t load the CF7 JS on the web.

    Do you know what could be stopping it from loading the scripts?
    The strange thing is that the CF7 CSS does load, for example:

    <link rel="stylesheet" id="contact-form-7-css" href=/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=5.9.8" media="all">

    Load on the source code, but not all the CF7 JS javascripts, that’s why the recaptcha doesn’t work.
    For example, this script doesn’t load:

    <script src="/wp-content/plugins/contact-form-7/modules/recaptcha/index.js?ver=5.9.8" id="wpcf7-recaptcha-js"></script>

    among others.

    Is there a way to force the loading of the scripts?

    I tried with this code that I found, but it’s still the same:

    add_filter( 'wpcf7_load_js', '__return_false' );
    add_filter( 'wpcf7_load_css', '__return_false' );
    add_action('get_header', 'load_wpcf7_scripts');
    function load_wpcf7_scripts() {
    if ( is_page() ) {
    if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
    wpcf7_enqueue_scripts();
    }
    if ( function_exists( 'wpcf7_enqueue_styles' ) ) {
    wpcf7_enqueue_styles();
    }
    }
    }
Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘form not send when activate google recaptcha’ is closed to new replies.