Zend Framework

Strange helper="formText" attribute in Zend_Form_Element_Captcha rendered output

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.8.4
  • Component/s: Zend_Form
  • Labels:
    None

Description

The rendered form output has code like:

<input type="hidden" name="captcha[id]" value="6a0422c9d14b6d9f9ec54266a3192183" helper="formText" id="captcha-id" />
<input type="text" name="captcha[input]" id="captcha-input" value="" helper="formText" /></dd>

where helper attribute is proprietary for html validations, throwing warnings

Issue Links

Activity

Hide
Ondrej Machulda added a comment -

Meanwhile the bug is fixed, there is a possible workaround how to get rid of this attribute and keep your HTML valid:

$captcha = new Zend_Form_Element_Captcha( ... );
unset($captcha->helper);

Show
Ondrej Machulda added a comment - Meanwhile the bug is fixed, there is a possible workaround how to get rid of this attribute and keep your HTML valid: $captcha = new Zend_Form_Element_Captcha( ... ); unset($captcha->helper);
Hide
Mike Willbanks added a comment -

Patch to add a test and patch the code.
Issue was that the captcha element contains a helper variable by changing the getAttribs to unset it later fixes the issue. Changing the scope of the $helper could also fix the intended issue.

Show
Mike Willbanks added a comment - Patch to add a test and patch the code. Issue was that the captcha element contains a helper variable by changing the getAttribs to unset it later fixes the issue. Changing the scope of the $helper could also fix the intended issue.
Hide
Matthew Weier O'Phinney added a comment -

Patch applied to trunk and 1.8 release branch – thanks, Mike!

Show
Matthew Weier O'Phinney added a comment - Patch applied to trunk and 1.8 release branch – thanks, Mike!

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: