Hi,
I'm trying to change the html outputted by Zend_Form using decorators.
I want the outputted HTML to look like this:
<form>
<fieldset>
<legend>Your Details</legend>
<dl>
<dt>label etc</dt>
<dd>input etc</dd>
<dt>label etc</dt>
<dd>input etc</dd>
</dl>
</fieldset>
<fieldset>
<legend>Address Details</legend>
<dl>
<dt>label etc</dt>
<dd>input etc</dd>
<dt>label etc</dt>
<dd>input etc</dd>
... etc ...
</dl>
</fieldset>
</form>
I've already broken the sections down i want within specific fieldsets using display groups, e.g.
$this->addDisplayGroup(array('name','email','telephone'),'yourdetails');
$yourdetails= $this->getDisplayGroup('personal');
$yourdetails->setDecorators(array(
'FormElements',
'Fieldset'
));
This gives me each section sitting within a fieldset but each form element is now lacking a wrapping dl so what i have is:
<form>
<fieldset>
<dt>label etc</dt>
<dd>input etc</dd>
<dt>label etc</dt>
<dd>input etc</dd>
</fieldset>
... etc
</form>