2011年1月23日星期日

Re: [fw-mvc] inject a html code after <form>

On Sunday 23 Jan 2011 13:15:36 sina miandashti wrote:
> I tried
> http://framework.zend.com/apidoc/core/Zend_Form/Zend_Form.html#setDescripti
> on ... before
> not showing ... maybe a bug !

By default Zend_Form does not add the description decorator to the form, only
to the form elements. You can add it yourself:

$form->addDecorator('Description');

If you want to have the decorator on all form instances, you can extend
Zend_Form and override Zend_Form#loadDefaultDecorators(), see
http://pastie.org/1489597

But one remark: I would use the description for text only and *not* html. The
markup should be rendered by an additional decorator or view helper, but I
wouldn't recommend to append/prepend html with the description decorator.

Regards, Jurian
--
Jurian Sluiman
Soflomo - http://soflomo.com

没有评论: