Hi all,
I have a little problem with Zend_Form and the decorators.
I created a Form which extend Zend_Form
In this form, I created an Email Element with the following code:
..
$emailField = new Zend_Form_Element_Text('email');
$emailField->setLabel('E-mail :')
->setRequired(true)
->setAllowEmpty(false)
$this->addElement($emailField);
$emailField->setDecorators(array('ViewHelper', array('HtmlTag', 'Label'));
...
In my view, I use the following code:
<?php echo $this->form->getElement('email') ?>
The render is:
<label for="email" class="required">E-mail :</label><input type="text"
name="email" id="email" value="">
I am trying to add a <br /> tag between the label and the input element
With the Decorator:
$emailField->setDecorators(array('ViewHelper', array('HtmlTag', array('tag'
=> 'br')), 'Label'));
The render is:
<label for="email" class="required">E-mail :</label><br><input type="text"
name="email" id="email" value=""></br>
But I would like this render:
<label for="email" class="required">E-mail :</label><br /><input type="text"
name="email" id="email" value="">
I don't know how to simply add a tag (i.e. <br />)
Is there anyone could help me?
Many thanks,
Guillaume BABIK
INTERNIM
45, rue Aristide Briand
92300 LEVALLOIS
Tel/Fax : 01.40.87.11.20
Mobile : 06.80.21.90.29
<BLOCKED::http://www.internim.com/> http://www.internim.com