4. Extras

March 17, 2017 ยท View on GitHub

Table of contents

  1. Installation and Setup
  2. Configuration
  3. Usage
  4. Extras
  5. FAQ

[reCaptcha V2] g-recaptcha tag attributes

AttributesValueDefaultDescription
data-sitekeyYour sitekey
data-themedark / lightlightOptional. The color theme of the widget.
data-typeaudio / imageimageOptional. The type of CAPTCHA to serve.
data-sizecompact / normalnormalOptional. The size of the widget.
data-tabindex0Optional. The tabindex of the widget and challenge. If other elements in your page use tabindex, it should be set to make user navigation easier.
data-callbackOptional. Your callback function that's executed when the user submits a successful CAPTCHA response. The user's response, g-recaptcha-response, will be the input for your callback function.
data-expired-callbackOptional. Your callback function that's executed when the recaptcha response expires and the user needs to solve a new CAPTCHA.

[Invisible reCaptcha] g-recaptcha tag attributes.

AttributesValueDefaultDescription
data-sitekeyYour sitekey
data-badgebottomleft / inline / bottomrightbottomrightOptional. Reposition the reCAPTCHA badge. 'inline' allows you to control the CSS.
data-typeaudio / imageimageOptional. The type of CAPTCHA to serve.
data-sizecompact / normalnormalOptional. The size of the widget.
data-tabindexOptional. The tabindex of the widget and challenge. If other elements in your page use tabindex, it should be set to make user navigation easier.
data-callbackonSubmitOptional. Your callback function that's executed when the user submits a successful CAPTCHA response. The user's response, g-recaptcha-response, will be the input for your callback function.

Examples

Check the examples folder for more usage details.