Tiger_Form_Element_Recaptcha

@api · extends Zend_Form_Element_Xhtml

Tiger_Form_Element_Recaptcha — a Google reCAPTCHA field for Tiger_Form.

Declare it like any element:

protected function elements(): array { return [ ['text', 'email', [...]], ['recaptcha', 'recaptcha', []], // v2 checkbox // v3: ['recaptcha', 'recaptcha', ['action' => 'signup']], ]; }

It renders through Tiger_View_Helper_FormRecaptcha and self-attaches Tiger_Validate_Recaptcha, which reads the widget's g-recaptcha-response token from the form context — so the element name doesn't matter and the value is never a real model field (setIgnore). It's not required (an empty token is handled by the validator with a proper reCAPTCHA message), but allowEmpty(false) forces the validator to run even when the field posts empty.

Methods

init()

init()

Configure the element: optional v3 action, not required, and self-attach the validator.