Adding the id attribute to a Zend_Form_Decorator_Label

ottawamom

New Member
I would like to add the id attribute to a label field in a Zend Form Element, but when setting 'id'=>'namelabel' in the decorator properties, it sets for='namelabel' in the label instead of adding the attribute of id='namelabel'\[code\]$name = new Zend_Form_Element_Text('name');$name->setLabel('Business Name:');$name->addDecorator('Label',array('class'=>'form_label', 'id'=>'namelabel'));$name->addDecorator('HtmlTag',array('tag'=>'span','class'=>'form_inputs'));$name->setOrder(1);$name->size='40';\[/code\]renders\[code\]<label for="namelabel" class="form_label optional">Business Name:</label>\[/code\]when I want it to render\[code\]<label id="namelabel" for="name" class="form_label optional">Business Name:</label>\[/code\]Is this even possible?
 
Back
Top