I apoligize in advance for posting another question about these decorators,
but I just keep banging my head against the wall.
Please see the html output of this form below.
class Forms_SubscribeForm extends Zend_Form {
public function __construct() {
parent::__construct();
$this->setAttrib('id','newsletterSubscribe');
$email = new Zend_Form_Element_Text('n_email');
$email->removeDecorator('DtDdWrapper');
$submit = new Zend_Form_Element_Submit('submit');
$submit->removeDecorator('DtDdWrapper');
$this->addElements(array($email, $submit));
$this->clearDecorators();
$this->setDecorators(array(
'FormElements',
array('HtmlTag', array('tag' => '<fieldset>')),
'Form'
));
}
}
HTML:
<form id="newsletterSubscribe"
enctype="application/x-www-form-urlencoded" action="" method="post"
name=""><fieldset>
<dt> </dt>
<dd>
<input type="text" name="n_email" id="n_email" value="" /></dd>
<input type="submit" name="submit" id="submit" value="submit"
/></fieldset></form>
END HTML
You can see that I was able to get rid of the dd from the submit
input, but it remains on the text input. I want to completely get rid
of the definition list and leave only the form tag, fieldset, and
input tags.
What am I doing wrong?
Thanks!