Reading through the code at https://www.gstatic.com/recaptcha/api2/v1531759913576/recaptcha__en.js there are numerous references to bottomleft
(as opposed to bottomright
where the icon is generally placed, I presume).
But how do I enable this setting and move the icon to the bottom left?
just worked this out. You need:
window._grecaptcha_callback = () => {
window.grecaptcha.render({
sitekey: grecaptcha_key,
badge: 'bottomleft',
})
window.grecaptcha.ready(() => {
// grecaptcha is ready
})
}
Then load the script as https://www.google.com/recaptcha/api.js?onload=_grecaptcha_callback
.
With this the way you call execute has to change slightly to simply
window.grecaptcha.execute(0, {action})
eg. 0
instead of the site key as the first argument.
Looking through the code there are a number of other undocumented settings:
sitekey, type, theme, size, tabindex, stoken, bind, preload, badge, s, pool, 'content-binding', action
But apart fromt sitekey
and badge
I don't know what they do. But they probably correspond roughly to the settings for v2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With