public function _initView()
{
$view = new Zend_View();
$view->addHelperPath(
APPLICATION_PATH . '/../vendor/cgsmith/zf1-recaptcha-2/src/Cgsmith/View/Helper',
'Cgsmith\\View\\Helper\\'
);
Zend_Controller_Action_HelperBroker::addHelper(new Zend_Controller_Action_Helper_ViewRenderer($view));
return $view;
}
public function _initRecaptcha()
{
$config = \Zend_Registry::get('appConfig');
$params = $config->recaptcha->toArray();
$params['messageTemplates'] = [
\Cgsmith\Validate\Recaptcha::INVALID_CAPTCHA => 'The captcha was invalid', // set custom/translated message
\Cgsmith\Validate\Recaptcha::CAPTCHA_EMPTY => 'The captcha must be completed'
];
\Zend_Registry::set('recaptcha', $params);
}
I get this:
Can you help me, please?
modules/default/forms/Registration.php
$this->addElement(new \Cgsmith\Form\Element\Recaptcha());
configs/application-local.php
modules/default/Bootstrap.php