• have Ajax form.

    fill out form but miss out a required field.

    submit, see gravity validation error.

    fix error, submit again.

    see spinner hanging form.

    Needs this JS to fix it as a hackfix, but needs a real fix in the plugin.

    (function ($) {
    // Reinitalize turnstiles after form is rendered (Bugfix for Simple Cloudflare Turnstile plugin)
    $(document).on('gform_post_render', function() {
    var turnstiles = document.querySelectorAll('.cf-turnstile');
    for (var index = 0; index < turnstiles.length; index++) {
    var turnstileId = turnstiles[index].id;
    turnstile.remove('#' + turnstileId);
    turnstile.render('#' + turnstileId);
    }
    });
    })(jQuery);

    Ignore the hopeless Gutenberg formatting, I can’t be bothered making it work properly.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘gravity form Ajax issue after failing validation’ is closed to new replies.