It is stupid that they don't have an easy way to prepend or append HTML code.

Do you love the word "stupid"?  ;)

Let's say: why would I use a callback decorator OR View SCript Decorator, in order to prepend this: "[MY ELEMENT GOES HERE]<div class="class"><span></span><a href="URL">TEXT<span></span></a></div>"

You can use the description.

Do you consider this is a complicated HTML code? If not, why would I create a new function OR file in order add this code, and not simply say something like this: $form->addElement('text', 'element-name', array('suffix'=>'MY-CODE-GOES-HERE'));

Please look at the issue in the tracker. Because there is a view-helper for this use case, but no element in Zend_Form. There also is a solution and this comes with a new major release. At the moment it is the simplest to download the element from issue tracker.

http://framework.zend.com/issues/secure/attachment/13557/Note.php

Reply via email to