{module_recaptcha}

Description

Displays Google's Recaptcha. This module can be added from the webform detail panel.

Syntax

{module_recaptcha theme="white" version="1" size="normal" type="image"}

Parameters

  • theme - the theme used, default is "white" for v1 and "light" for v2
  • version - version of reCaptcha used
    • 1 - for v1 (default)
    • 2 - for v2
  • size - the size of the widget (only for v2)
    • normal (default)
    • compact
  • type - the type of recaptcha to serve (only for v2)
    • image (default)
    • audio

Note: For themes and more information please check Google reCAPTCHA Documentation: Version 1.0 - Customizing the Look and Feel, Version 2.0 - Displaying the widget

Examples

  • {module_recaptcha version="2"} - will display a default v2 reCaptcha.
  • {module_recaptcha theme="red" size="compact" type="audio"} - will display a v1 reCaptcha with the red theme, the size and type parameters are only for v2, they will be ignored

Known Issues

Back button issue: In IE or Edge when visiting a page containing a ReCaptcha V2 control by using the back button after the form submission, one of the following problems might happen:

  • the reCaptcha control displays the "ERROR: Stoken expired" message
  • the reCaptcha control loads ok but the spinner enters an infinite loop when clicking the checkbox

End users can still use the page if refreshing it from the browser. Alternatively, partners can provide a links or buttons like below for refreshing all ReCaptcha controls from the page:

<a href="#" onclick="reCaptchaV2Manager.reloadControls(); return false;">Reload captcha</a>

Both reCaptcha versions on the same page: V2 controls will not work on back button if V1 controls are present as well.

 

Syntax

{module_recaptcha,theme,version,size,type}

Parameters

  • theme - the theme used, default is "white" for v1 and "light" for v2
  • version - version of reCaptcha used
    • 1 - for v1 (default)
    • 2 - for v2
  • size - the size of the widget (only for v2)
    • normal (default)
    • compact
  • type - the type of CAPTCHA to serve (for v2)
    • image (default)
    • audio

Note: For themes and more information please check Google reCAPTCHA Documentation: Version 1.0 - Customizing the Look and Feel, Version 2.0 - Displaying the widget

Examples

  • {module_recaptcha} - will display the v1 reCaptcha with all default parameters.
  • {module_recaptcha,dark,2,compact,} - will display the v2 reCaptcha with a dark theme and a compact size.

Known Issues

Back button issue: In IE or Edge when visiting a page containing a ReCaptcha V2 control by using the back button after the form submission, one of the following problems might happen:

  • the reCaptcha control displays the "ERROR: Stoken expired" message
  • the reCaptcha control loads ok but the spinner enters an infinite loop when clicking the checkbox

End users can still use the page if refreshing it from the browser. Alternatively, partners can provide a links or buttons like below for refreshing all ReCaptcha controls from the page:

<a href="#" onclick="reCaptchaV2Manager.reloadControls(); return false;">Reload captcha</a>

Both reCaptcha versions on the same page: V2 controls will not work on back button if V1 controls are present as well.