• Resolved jmslbam

    (@jmslbam)


    Hi, Thank you for the plugin.

    Found this also occurs with CF7 forms.

    I fixed it with some CSS, by hiding all but the first Turnstiles

    Kind regards,

    Jaime!

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Elliot Sowersby

    (@elliotvs)

    Hi,

    It appears this may not be a plugin specific issue, but more so a issue on Cloudflares end.

    Looking at this Cloudflare Community support thread it seems some others are having similar issues, even without specifically using this plugin.

    https://community.cloudflare.com/t/turnstile-ready-firing-twice/690171

    I am still investigating however.

    Just to add that, on my site, it appears duplicated for CF7 AFTER successful submission. I hope there is a solution to this problem.

    Thread Starter jmslbam

    (@jmslbam)

    Hi @elliotvs, thank you for your reply and time!

    In the mean time, I fixed it with this CSS snippet ?? so no pressure and let’s just wait for CF to solve it!

    cc @sao987 See below:

    .cf-turnstile > div:not(:last-child) {
    display: none;
    }

    Kind regards!

    Jaime

    @jmslbam Thanks for your CSS snippet! It works well while we continue waiting for CF to resolve the issue.

    Hi, I think it is not turnstile issue. In “contact-form-7.php” you have the this code:
    <script>
    ? ? ? ? document.addEventListener(“DOMContentLoaded”,function(){
    ? ? ? ? ? ? document.querySelectorAll(‘.wpcf7-form’).forEach(function(e){
    ? ? ? ? ? ? ? ? e.addEventListener(‘submit’,function(){
    ? ? ? ? ? ? ? ? ? ? if(document.getElementById(‘cf-turnstile-cf7-<?php echo $id; ?>’)){
    ? ? ? ? ? ? ? ? ? ? ? ? setTimeout(function(){
    ? ? ? ? ? ? ? ? ? ? ? ? ? ? turnstile.render(‘#cf-turnstile-cf7-<?php echo $id; ?>’);
    ? ? ? ? ? ? ? ? ? ? ? ? },4000)}
    ? ? ? ? ? ? ? ? })
    ? ? ? ? ? ? })
    ? ? ? ? });</script>

    This script renders a new widget each time the submit button is pressed, but there is no removal of the previous widget.

    In the same code you can remove the previous widget before rendering a new one. For example with:
    document.getElementById(‘cf-turnstile-cf7-<?php echo $id; ?>’).innerHTML = ”;

    There could be a better way, but this one is working.

    Plugin Author Elliot Sowersby

    (@elliotvs)

    Hi,

    Please could you try version 1.27.0 and see if this resolves the issue for you?

    Perfect! everything working as expected.
    Thank you for the fast resolution of the issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.