Skip to content

Having multiple forms with V3 recaptcha overwrites global js variables #290

@FluffyDiscord

Description

@FluffyDiscord

I have multiple forms on page that use V3 validation. The issue is, that for every form, the widget outputs <script> which contains globally defined variables such as grecaptchaInput or grecaptchaForm which are being overwritten with each new form in page.

The solution is either use local vars, such as let or const or add random prefix to them when generating the widget script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions