Here is my code
private $elementDecorators = array(
'ViewHelper',
'Errors',
array(array('data' => 'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td','class'=>'blue-color','placement'=>'prepend')),
array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
);
public function init()
{
$username = new Zend_Form_Element_Text('username',array(
'decorators' =>$this->elementDecorators,
'label' =>'Username',
'required' =>true,
'span' =>array('class'=>'validation','id'=>'unameInfo'),
));
}
$this->addElements(array(
$username
));
$this->setDecorators(array(
'FormElements',
array('HtmlTag',
array('tag'=>'table', 'width' => '100%')
),
'Form'
));
Form created for above code is as below
<tr>
<td id="username-label"><label for="username" class="blue-color required">Username</label></td>
<td><input type="text" name="username" id="username" value="" span="Array"></td>
</tr>
I want following html
<tr>
<td id="username-label"><label for="username" class="blue-color required">Username</label></td>
<td>
<input type="text" name="username" id="username" value="" span="Array">
<span class="validation" id="userinfo"></span>
</td>
</tr>
How can i add span tag in my above zend form code?
Thank you in advance