views:

8

answers:

0

I've added a captcha field to my zend form, and want it not to be required as I'm using other methods on the page to check its validity, yet when I click submit, I'm warned about the missing captcha field, how can I stop this?

        $recaptcha = new My_Service_ReCaptcha('6LfD8L0SAAAAANog3CBouttFvT42SurnwK6u-UOA', '6LfD8L0SAAAAAAMQCSrwFuLJ13Iiecd9k8swgdC3');
    $recaptcha->setOptions(array('theme'=>'custom', 'lang'=>'en', 'custom_theme_widget'=> 'recaptcha_widget')); 

    $captcha = new Zend_Form_Element_Captcha('captcha',
      array('captcha'        => 'ReCaptcha',
        'decorators' => $this->elementDecorators,
      'label' => 'Captcha',
            'captchaOptions' => array('captcha' => 'ReCaptcha', 'service' => $recaptcha),
            'required' => false
      )
    );

    $this->addElement($captcha);