ZF-9268: Inconsistent id with Zend_Form_Element_Captcha

Description

There is a very small inconsistency with Zend_Form_Element_Captcha, because contrary to all elements that generate an

, the HtmlTag decorator with Zend_Form_Element_Captcha has no id : public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return; } $decorators = $this->getDecorators(); if (empty($decorators)) { $this->addDecorator('Errors') ->addDecorator('Description', array('tag' => 'p', 'class' => 'description')) ->addDecorator('HtmlTag', array('tag' => 'dd') ->addDecorator('Label', array('tag' => 'dt')); } } Here is the fix, so that it is consistent with other elements : public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return; } $decorators = $this->getDecorators(); if (empty($decorators)) { $this->addDecorator('Errors') ->addDecorator('Description', array('tag' => 'p', 'class' => 'description')) ->addDecorator('HtmlTag', array('tag' => 'dd', 'id' => $this->getName() . '-element')) ->addDecorator('Label', array('tag' => 'dt')); } }

Comments

fixed in trunk