Tiger_View_Helper_FormRecaptcha

@api · extends Zend_View_Helper_Abstract

Tiger_View_Helper_FormRecaptcha — renders the Google reCAPTCHA widget.

The view-helper backing Tiger_Form_Element_Recaptcha (so a form declares ['recaptcha', 'recaptcha', []] and the markup appears), and also callable directly in a hand-written view as $this->formRecaptcha().

v2 -> the checkbox widget. v3 -> loads the score API and, on submit, injects a fresh token into a hidden g-recaptcha-response field of the surrounding form. The api.js script is emitted once per render pass. When reCAPTCHA is disabled (or no site key), it renders NOTHING — so a form is unencumbered in dev.

Methods

formRecaptcha()

formRecaptcha($name = 'g-recaptcha-response', $value = null, $attribs = null)
  • $name string — element name (v3 uses it as the hidden field name; default fine)
  • $value mixed — ignored (the token is produced by the widget)
  • $attribs array — optional: ['action' => 'login'] for v3, ['theme'|'size'] for v2

Returns string