Details
Description
Rendering Zend_Form_Element_Captcha in Zend_Form with a label decorator results in invalid HTML, where <label> is not correctly paired with the captcha's <input> field.
<dt><label for="captcha" class="required">Captcha</label></dt>
<dd>
<img alt="" src="/images/captcha/..."/><br/>
<input type="hidden" name="captcha[id]" value="..." id="captcha-id" />
<input type="text" name="captcha[input]" id="captcha-input" value="" />
</dd>
As can be seen, <label> with its for attribute points to "captcha" element, while there is no element with this id. Proper behavior would be pointing to "captcha-input", as it is a text input field for captcha value.
fixed, thanks