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?
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?
You have to define your own form element decorators, omitting the description decorator. Check this tutorial for details.
To actually remove the description data, rather than the description decorator, you can use:
$form->getElement('elementName')->setDescription('');