I've found what I was lloking for, I'll post here for reference.

            array('HtmlTag',array(

                'tag' => 'p',

                'openOnly' => true,

                'placement' => Zend_Form_Decorator_Abstract::APPEND

            ))

                

Sergio Rinaudo



From: [email protected]
To: [email protected]
Date: Thu, 14 May 2009 19:28:01 +0200
Subject: [fw-general] Zend_Form: append or prepend tags near to an element








Hi, 
if I want to append or prepend any tag near to an element of my form, 
what should I do? 

For example, I have this code

      $titleField = new Zend_Form_Element_Text('titolo');
      $titleField->class = 'inputText required';
      $titleField->setDecorators(array(
            array('ViewHelper',
                  array('helper' => 'formText'))
          ));

render this html

<input type="text" class="inputText required validateMail email" value="" 
id="titolo" name="titolo"/>

What about if I want to render a <p> tag before or after, for example





<input type="text" class="inputText required validateMail email" value="" 
id="titolo" name="titolo"/>
<p>Some content...</p>

or 

<p>Some content...</p>


<input type="text" class="inputText required validateMail email" value="" 
id="titolo" name="titolo"/>


?
Thanks

Sergio Rinaudo

Cerchi i tuoi spazi? Hotmail va oltre i 5GB. Scopri perché!
_________________________________________________________________
Cerca le Parole, gioca su Typectionary!
http://typectionary.it.msn.com/

Reply via email to