Skip to content

Turnstile doesn't show when page is first loaded but shows up if page is refreshed #6

@omriasta

Description

@omriasta

I have a form that is embedded in a landing page but the behaviour is the same in the form preview as well.
If I load the page, turnstile doesn't show up, and if I fill out ths form, I get Turnstile wasn't successful.
The dev console of the browser shows this error:
api.js?render=explicit&onload=onloadTurnstileCallback:1 Uncaught TurnstileError: [Cloudflare Turnstile] Invalid type for parameter "container", expected "string" or an implementation of "HTMLElement".
m @ api.js?render=explicit&onload=onloadTurnstileCallback:1
N @ api.js?render=explicit&onload=onloadTurnstileCallback:1
onloadTurnstileCallback @ signup:66
(anonymous) @ api.js?render=explicit&onload=onloadTurnstileCallback:1
setTimeout
(anonymous) @ api.js?render=explicit&onload=onloadTurnstileCallback:1
(anonymous) @ api.js?render=explicit&onload=onloadTurnstileCallback:1

If I refresh the same page then turnstile does load and the form can be successfully completed. Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions