este es mi form.
Código PHP:
$this->clearDecorators()
->addDecorator('FormElements')
->addDecorator('HtmlTag', array('tag' => 'div'))
->addDecorator('Form');
$name = new Zend_Form_Element_Text('name',
array('label' => 'Name:',
'required' => true,
'filters' => array('StringTrim'),
'maxlength' => 64
)
);
$name->setDecorators(array( 'ViewHelper', 'Errors', 'Label',));
this->addElements(array($name);
$this->setElementDecorators(array(
array('ViewHelper'),
array('Errors',array('class'=>'error-list')),
array('Label', array('class' => 'fs16')),
));
Código HTML:
<div> <label class="fs16 required" for="name">Name:</label> <input type="text" class="Bnone" maxlength="64" value="" id="name" name="name"> </div>
Código HTML:
<div> <div> <label class="fs16 required" for="name">Name:</label> </div> <div> <input type="text" class="Bnone" maxlength="64" value="" id="name" name="name"> </div> </div>
como por ej.
En mi elemento nombre....
Código PHP:
$name->setDecorators(array(
'ViewHelper',array(array('label' => 'HtmlTag'), array('tag' => 'div', 'placement' => 'prepend'))