/** * Creates the captcha element. * * @return Zend_Form_Element */ protected function createCaptcha() { $captcha = new Zend_Form_Element_Captcha($this->captchaOptions); if ($this->getOption('generateId', false)) { // Generate a unique element ID to avoid clashes if two // captchas are rendered on the same page. $captcha->setAttrib('id', $captcha->getId() . '-' . uniqid()); } return $captcha; }