开发者

Zend Form ReCaptcha not working

I have a simple Zend-based form with reCaptcha element: $form = new Zend_Form(); $form->setName('forgotpassword') ->setMethod('POST');

    $public = Lyf_Config::get('recapctha.public');
    $private = Lyf_Config::get('recapctha.private');
    $recaptcha = new Zend_Service_ReCaptcha($public, $private);

    $captcha = new Zend_Form_Element_Captcha('recaptcha',array(
        'captcha' => 'ReCaptcha',
        'captchaOptions' => array(
            'captcha' => 'ReCaptcha',
            'service' => $recaptcha
    )));


    $form->addElements(array($captcha));

    $form->setDecorators(array(array('ViewScript', array('viewScript' => 'login/passwordform.phtml', 'escape' => false))));

I want to see the element like this: http://webma开发者_StackOverflow中文版sterblog.com.ua/wp-content/uploads/2009/07/recaptcha-example.gif. But instead of this element I see the simple input text element. What I doing wrong?

Thank you in advance. Sorry for my english.


It was helpful:

echo $captcha->getHtml();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜