Richard Knop
Richard Knop

Reputation: 83755

Remove Element Description In Controller (Zend_Form)

I would like to edit an element description in the action controller. I'm trying to do it like this:

$form->element->setAttrib('description', '');

But it doesn't work. Any ideas?

Upvotes: 2

Views: 972

Answers (2)

berty
berty

Reputation: 319

To actually remove the description data, rather than the description decorator, you can use:

$form->getElement('elementName')->setDescription('');

Upvotes: 1

Ivan Krechetov
Ivan Krechetov

Reputation: 19220

You have to define your own form element decorators, omitting the description decorator. Check this tutorial for details.

Upvotes: 2

Related Questions