views:

46

answers:

1

I set up my Zend_Form with XML, now just one line I couldn't transfer to XML.

/* Do some stuff like $form = new Zend_Form etc */
$form->removeDecorator('HtmlTag');

How could I add removeDecorator to XML? My try:

<forms>
  <login>
    <action>form/</action>
    <method>post</method>
    <options>
        <removeDecorator>HtmlTag</removeDecorator>
    </options>
    <elements>
    <!--- stuff --->
    </elements>
  </login>
</forms>

But it don't remove the <dl class="zend_form">.

+1  A: 

You can’t. Zend_Form will translate your configuration keys to calls for set*() methods. Use the configuration files to set and add properties, and code PHP to remove things.

Joó Ádám