Using Zend Framework 1.6.0 RC 1 if I add an hidden element to a form with the
'id' name, it's rendered (and escaped) inside the id attrib of the form too.

Example:

class TestForm extends Zend_Form
{
        public function __construct()
        {
                parent::__construct();
                
                $elem = new Zend_Form_Element_Hidden('id');

                $this->addElements(array($elem));
        }
}


The HTML output is

<form id="&amp;lt;dt&amp;gt;&amp;lt;/dt&amp;gt;
&amp;lt;dd&amp;gt;
&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;id&amp;quot;
value=&amp;quot;&amp;quot; id=&amp;quot;id&amp;quot;
/&amp;gt;&amp;lt;/dd&amp;gt;" enctype="application/x-www-form-urlencoded"
action="" method="post"><dl class="zend_form">
<dt></dt>
<dd>
<input type="hidden" name="id" value="" id="id" /></dd></dl></form>

-- 
View this message in context: 
http://www.nabble.com/Zend-Form-id-attrib-rendering-error-tp18847554p18847554.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to