Skip to content

Handling two recaptchas on same page #68

Closed
@joelfloressottile

Description

@joelfloressottile

I'm having problems finding a solution for two recaptchas that are in two different components in the same page and have different methods runnig for their emitted onSuccess events.

If I run this.$recaptcha.getResponse() on any of them because of a form submit the onSuccess emitted event will run both of the AJAX in both of the components.

I tried using ref in each one of them, but I can't find a way to run the getResponse() so I dont have to call this.$recaptcha.getResponse() and instead call it like this.$refs.componentOneRecaptcha.getResponse() but it wont run at that level because there's no getResponse(). Is there any other smarter way to do this?

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