Turnstile fails to show when there are multiple forms in the page


I have a single page application where there are two forms, The Turnstile(managed) widget is displayed in the first form all the time but the widget in the second form doesn’t show up 8 out of 10 times.

Even multiple refreshes of the page doesn’t help address this behavior. I don’t see any obvious errors in the console when this happens.

For using captcha same page for 2 or multiple Forms you have to set the id of those 2 form different then it will work smoothly.
I already work out this to create and website which use php .

For create Id dynamically you have to pass the random id with ID of form like “abc_123”

then using js or what method you will use you can run loop over the “abc_*” using wild card condition easily and then pass those id to trunsitle function and then can use like this for multiple form on a single page

1 Like

Thanks @ashish200025 !

Didn’t think it could be solved at my end, Different form id makes sense.

Much appreciated.

this will solved buddy let me show you code like

window.onloadTurnstileCallback = function () {   
      jQuery( "[id^=abc-]" ).each(function() {  
          turnstile.render('#'+ this.id, {      
            sitekey: '1232132454512',      
1 Like

I should have made my sentence clear, I meant different form ids solved the issue like you said!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.