0


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://webmasterblog.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.

Alex Pliutau
  • 21,392
  • 27
  • 113
  • 143
  • try not to use custom decorator in order to tell if the problem from the decorator or from `Zend_Service_ReCaptcha` setting – tawfekov Dec 25 '10 at 11:35

1 Answers1

0

It was helpful:

echo $captcha->getHtml();
Alex Pliutau
  • 21,392
  • 27
  • 113
  • 143