Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline example #164

Open
asawatzki opened this issue Apr 6, 2020 · 4 comments
Open

inline example #164

asawatzki opened this issue Apr 6, 2020 · 4 comments

Comments

@asawatzki
Copy link

Hi,

I'm trying to render the badge inline (because it is hidden by the footer), but it does not work. Probably, I'm doing it wrong. Can you give me some example or hint?

I register the plugin like:

import Vue from "vue";
import { VueReCaptcha } from "vue-recaptcha-v3";

Vue.use(VueReCaptcha, {
  siteKey: process.env.RECAPTCHA_PUBLIC_KEY,
  loaderOptions: {
    useRecaptchaNet: true,
    autoHideBadge: false
  },
  explicitRenderParameters: {
    container: 'inline-badge',
    badge: 'inline',
    size: 'invisible'
  }
});

and use it like:

<template>
  <v-container>
   <div id="inline-badge"></div>
   <v-btn @click="submit">Suche</v-btn>
  </v-container>
</template>
@SerhiyRomanov
Copy link

Hi, i'm faced with the same problem. How can I render the Recaptcha badge inline in my form? Are there any example?

@bokuns
Copy link

bokuns commented Apr 14, 2021

This works for me, you could just use recaptcha-v3 package instead.

I guess the problem with your code example is that <div id="inline-badge"></div> does not exist until the component mounted, thus configuring the container inside Vue.use(...) at the beginning might not bind the element correctly.

@sjsd
Copy link

sjsd commented Feb 2, 2022

Try following setup:

      loaderOptions: {
        explicitRenderParameters: {
          container: 'inline-badge',
          badge: 'inline',
        },
      },

@ErikEndler
Copy link

work for me

explicitRenderParameters: {
          container: 'inline-badge',
          badge: 'inline',
        },

but in the console log it shows this:
Uncaught (in promise) Error: grecaptcha.execute only works with invisible reCAPTCHA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@sjsd @SerhiyRomanov @asawatzki @ErikEndler @bokuns and others