• When using this plugin with Elementor forms, this piece of javascript gets inserted just before the form:

    <script>
    jQuery(document).ready(function() {
    jQuery(".elementor-form").on('submit', function() {
    var submittedForm = jQuery(this);
    setTimeout(function() {
    var turnstileElement = submittedForm.find('.cf-turnstile');
    if (turnstileElement.length > 0) {
    var uniqueId = 'cf-turnstile-elementor-' + new Date().getTime();
    turnstileElement.attr('id', uniqueId);
    turnstile.reset('#' + uniqueId);
    }
    }, 2500);
    });
    });
    </script>

    However, when the actual jQuery JS file is loaded in the footer of the site, jQuery does not exist yet at this point, resulting in a JS error in the browser console:

    ReferenceError: Can’t find variable: jQuery

Viewing 1 replies (of 1 total)
  • I’m running into the same issue.

    Turnstile JS is inserted before the form, whereas jQuery is enqueued in the footer.

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