I don't know why, but now it works :jumping:
$recaptcha = new Zend_Service_ReCaptcha('*', '*');
$captcha = new Zend_Form_Element_Captcha('captcha', array(
'label' => "Please verify you're a human",
'captcha' => 'ReCaptcha',
'captchaOptions' => array(
'service' => $recaptcha
)
));
$this->addElement($captcha);
Regards,
Sasa Stamenkovic
umpirsky wrote:
>
> Hi zf gurus.
>
> I have my form which extends Zend_Form, and in my init method I have
> following code:
>
> $recaptcha = new Zend_Service_ReCaptcha('*', '*');
>
> $captcha = new Zend_Form_Element_Captcha('challenge',
> array('captcha' => 'ReCaptcha',
> 'captchaOptions' => array('captcha' => 'ReCaptcha',
> 'service' =>
> $recaptcha)));
>
> $this->addElement($recaptcha);
>
> running this with Zend_Version 1.8.1 throws error:
>
> Notice: Undefined index: in \library\Zend\Form.php on line 1002
>
> Fatal error: Call to a member function getOrder() on a non-object in
> \library\Zend\Form.php on line 1002
>
> Any idea why this fails?
>
> Regards,
> Sasa Stamenkovic
>
--
View this message in context:
http://www.nabble.com/Zend_Service_ReCaptcha-in-Zend_Form-tp24395850p24397521.html
Sent from the Zend Framework mailing list archive at Nabble.com.