On Monday 24 November 2008 17:01:46 you wrote: > Hi Graham, > > Thanks for the reply. > > Im new to ZF and have added the following line as you suggested, this > is what I now have: > > $this->addElement( > 'Textarea', > 'message', > array( > 'label' => 'Message * (will grow > automatically)', > 'required' => true, > 'style' => 'width: 200px' > ) > )->addDecorator('HtmlTag', array('tag' => 'div')); > > But this just wraps the whole form in a div tag, I guess I need to > remove/overwrite the default decorator? Would be > grateful of any help
I'm not quite sure why it wraps the whole form using the method above, but this should work on the single textarea element. $this->addElement('Textarea', 'message', array( 'label' => 'Message * (will grow automatically)', 'required' => true, 'style' => 'width: 200px' ) ); $this->getElement('message') ->getDecorator('HtmlTag') ->setOption('tag', 'div'); Graham