Hi all,

I've been struggling to decorate a subform. It's almost there but I keep running into a 'gotcha'. I can't figure out how to wrap the innermost dt/dd pairs in a dl element. If I add another HtmlTag the outer one no longer renders and the inner one inherits the outer one's class attribute.

this:

$subForm->setDecorators(array(
    'FormElements',
    'Fieldset',
    'DtDdWrapper',
    array('HtmlTag', array('tag' => 'dl',
                         'class' => 'zend_form')),
    'Form'
));

produces:

<form id="user">
  <dl class="zend_form">
    <dt id="user-label"> </dt>
    <dd id="user-element">
      <fieldset id="fieldset-user">
        <legend>Sign-up Form</legend>

        <dt id="name-label"></dt>      <<<<<<
        <dd id="name-element"></dd>    <<<<<<

      </fieldset>
    </dd>
  </dl>
</form>

Any ideas on how to do this?

Thanks in advance for any help!

Mike Wright

Reply via email to