Zend Framework

Invalid XHTML strict produced by form decorator about Zend_Form_Element_Captcha

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.7.1
  • Fix Version/s: None
  • Component/s: Zend_Captcha
  • Labels:
    None

Description

As described in
http://www.nabble.com/Zend_Form-Captcha-Invalid-xhtml-maybe-bug---td19917080.html
The html produced by the form decorator about "Zend_Form_Element_Captcha" is not valid XHTML strict. Here is an example html:

<input type="hidden" name="captcha[id]" value="ec941ce9a00dd7e7cd9a9b34015931e8" helper="formText" id="captcha-id" />

the "helper" attribute should not be there

Issue Links

Activity

Hide
David Siembab added a comment -

pass 'helper' => null
example:
$captcha = new Zend_Form_Element_Captcha(
'captcha', array(
'helper' => null,
'captcha' => array(
'captcha' => 'Image',
'wordLen' => 6,
'timeout' => 300,
'imgDir' => 'img/captcha',
'imgUrl' => 'http://urlpath/img/captcha',
'width' => 200,
'height' => 60,
'font' => '/absolute/path/to/your/font.ttf'
)));
this works for me, but unfortunately this is not the default with the decorator for the captcha element
line 89 Zend/Form/Decorator/ViewHelper.php I think

Show
David Siembab added a comment - pass 'helper' => null example: $captcha = new Zend_Form_Element_Captcha( 'captcha', array( 'helper' => null, 'captcha' => array( 'captcha' => 'Image', 'wordLen' => 6, 'timeout' => 300, 'imgDir' => 'img/captcha', 'imgUrl' => 'http://urlpath/img/captcha', 'width' => 200, 'height' => 60, 'font' => '/absolute/path/to/your/font.ttf' ))); this works for me, but unfortunately this is not the default with the decorator for the captcha element line 89 Zend/Form/Decorator/ViewHelper.php I think
Hide
Stanislav Malyshev added a comment -

It uses formHidden so it's probably form view helper issue...

Show
Stanislav Malyshev added a comment - It uses formHidden so it's probably form view helper issue...

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: