• I have created a custom theme in WordPress. I’m using WPForms plugin to add forms to my site. It works if I disable “anti-spam” and “reCaptcha”, but if I enable any of those I get error messages both in my form and from reCaptcha.

    Before submit
    Form error: Please enable JavaScript in your browser to complete this form.

    After submit
    Form error: Form error message
    Form has not been submitted, please see the errors below.
    reCaptcha error: Recaptcha error messageGoogle reCAPTCHA verification failed, please try again later.

    I also can’t see my reCaptcha symbol. I have tried to use v2 checkbox, I can’t even see the checkbox in my form. I have tried v2 that works in the background, same problem. I have also tried v3 and that does not work either.

    I have been in contact with the support for WPForms but they don’t know what the problem is.

    Do I need do add something in my functions.php file to enable anti-spam and reCaptcha related things?

    I have also tried to use another form plugin Custom Form 7, I have the same issue there. It works without reCaptcha, but with it I get errors.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Does everything work if you switch to a default theme? I’m wondering if it’s a problem with the theme or simply the reCAPTCHA setup itself.

    Thread Starter amandahwatz

    (@amandahwatz)

    When I try another theme, I get this error message before submit in my form:

    Heads up! WPForms has detected an issue with JavaScript on this page. JavaScript is required for this form to work properly, so this form may not work as expected. See our troubleshooting guide to learn more or contact support.

    This message is only displayed to site administrators.

    But I can see my reCaptcha checkbox and I can also submit the form. So I guess there is issues in my theme and also something with my form?

    I have also double checked that JavaScript is enabled in my browser, and it is. I’m using Chrome.

    • This reply was modified 1 year, 4 months ago by amandahwatz.
    • This reply was modified 1 year, 4 months ago by amandahwatz.

    I’m not familiar with how WPForms works, but I don’t see any WPForms JavaScript being loaded on your page at all. I suspect that is the issue, but I don’t know why it’s not loading it.

    Thread Starter amandahwatz

    (@amandahwatz)

    I don’t have any Javascript errors in my console so I don’t know why it wouldn’t run. I have tried to run the wpforms.js file from the plugin manually by enqueuing it in my functions.php file, but that creates other issues and I couldn’t solve it that way.

    Thread Starter amandahwatz

    (@amandahwatz)

    I also don’t understand why the reCaptcha checkbox is visible in the default theme and not in my custom theme. What is needed for it to work?

    I would try running WPForms with reCAPTCHA on a fresh WordPress install and then slowly add the plugins and/or theme you are using to see what causes the issue.

    Thread Starter amandahwatz

    (@amandahwatz)

    But the reCaptcha checkbox shows up when I change the theme to a default theme, so something must be missing in my custom theme for it to show up.

    Thread Starter amandahwatz

    (@amandahwatz)

    I have looked in the functions.php file for the default themes, but I can’t see anything obvious that I need to add..

    Yes, there’s something going on with the theme it seems. But even with a default theme, it doesn’t work correctly (the WPForms JavaScript is not included). It’s possible that whatever is causing that issue is also affecting your theme.

    So that’s why I’d start with just getting WPForms to function correctly without your theme. The easiest way to do this is to start with a blank WordPress site somewhere and add your plugins/code until WPForms breaks again. Then figure out what specific plugin/code conflicts with WPForms.

    • This reply was modified 1 year, 4 months ago by KratosGemini.
    Thread Starter amandahwatz

    (@amandahwatz)

    Yes I understand. You are probably right, I will try to set up a new site and see if I can find the problem.

    Thank you for answering ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Issue with anti-spam in my custom WordPress theme’ is closed to new replies.