Hi,
I did test this recently with Elementor’s built-in popups, with an Elementor form inside, and it worked fine on my end. I’ll take another look when I can.
Are you using a separate popup plugin? If so it may not be compatible with this, and may require a custom JS trigger when the popup is clicked/opened to render the widget.
I’m not sure why this was marked as resolved, as the issue still persists for me in Elementor Popups.
Turnstile appeared correctly when first set up, but it no longer shows on the form. When I try to submit the form (which is connected to ActiveCampaign), I see a warning about Turnstile verification, yet the form still proceeds with submission and redirects to another page.
However, the actual submission fails — no lead is added to my ActiveCampaign list.
Hi,
Could you give the latest update a try and see if it works any better now? There are also some new options under “Elementor” in the plugin settings that you can test out.
Hi Elliot,
I have replied here: https://github.com/ElliotSowersby/simple-cloudflare-turnstile/issues/67
I also had a look at your Elementor JS code — it seems you’re not handling the errors returned by Turnstile.
This solved it for me (found here: https://community.cloudflare.com/t/turnstile-not-working-inside-fancybox-modal/562481, change sitekey):
(function($) {
$(document).ready(function() {
$(document).on( 'elementor/popup/show', function() {
const widgetElement = document.querySelector('.elementor-popup-modal .cf-turnstile');
// Initialize Turnstile only when modal is opened
if (!widgetElement.hasAttribute('data-initialized')) {
cfWidgetId = turnstile.render('.elementor-popup-modal .cf-turnstile', { // Get widget id
sitekey: 'YOUR_SITEKEY',
callback: function(token) {
console.log("CAPTCHA completed.");
}
});
// Mark as initialized to prevent re-initialization
widgetElement.setAttribute('data-initialized', 'true');
}
});
}); // End document.ready
})( jQuery );