it should look like:
$element->clearDecorators()
->addDecorator('ViewHelper')
->addDecorator('Errors')
->addDecorator('HtmlTag', array('tag' => 'dd'))
->addDecorator('Label', array('tag' => 'dt'))
->addDecorator(array('invalidTag' => 'HtmlTag'), array('tag' => 'div'));
To use ul/li with Zend_Form from the trunk, it would look like that:
$form = new Zend_Form(array('disableLoadDefaultDecorators' => true));
$form->addDecorator('FormElements')
->addDecorator('HtmlTag', array('tag' => 'ul', 'class' => 'zend_form'))
->addDecorator('Form');
$element = new Zend_Form_Element_Text('test',
array('disableLoadDefaultDecorators' => true));
$element->addDecorator('Label', $required)
->addDecorator('ViewHelper')
->addDecorator('Errors')
->addDecorator('HtmlTag', array('tag' => 'li'));
$form->addElement($element);
bouzafr wrote:
>
> Thank you guys!!!
>
> I'm sorry guys I haven't done HTML in a while, not an expert much less on
> version 4 :-) Now I'm aware of it.
>
> Dino, I tried that and I got the DIV just on the element. not with the
> label
> and the element... but never mind, it it's invalid no worth trying to fix
> it.
>
>
--
View this message in context:
http://www.nabble.com/Form-decorators.-tp15949543s16154p15973854.html
Sent from the Zend Framework mailing list archive at Nabble.com.