Hi all.
I have my form (Zend Form) with this element:

$this->addElement('select','category',array('label' => 'Sotto categoria', 'class' => 'field_category', 'id' => 'field_category'));
       $this->getElement('category')
->addDecorator('HtmlTag',array('tag' => 'div', 'class' => 'dec_category', 'style' => 'display:none')) ->addDecorator('Label',array('tag' => 'span', 'class' => 'label label_category', 'style' => 'display:none'))
           ;

The resultant HTML is:

<span>
<label class="label label_category optional" style="display: none;" for="field_category">Sotto categoria</label>
</span>
<div class="dec_category" style="display: none;">
<select id="field_category" class="field_category" name="category"> </select>
</div>
<dt> </dt>

I think that the last <dt> </dt> is for the "description" field. How can I remove it ?

And: I need to enclose all "select" element (select + label) in a <div> with a class/ name like "pippo". Ok, I need this:

<div class="pippo" id="pippo">
   <span>
<label class="label label_category optional" style="display: none;" for="field_category">Sotto categoria</label>
   </span>
   <div class="dec_category" style="display: none;">
<select id="field_category" class="field_category" name="category"> </select>
   </div>
   <dt> </dt>
</div>

How can I do this ?

Pls help me.

Tnx.

--
Michel 'ZioBudda' Morelli                       [email protected]
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.it MSN: [email protected] JABBER: [email protected]

Reply via email to