Hi all,
I have a question concerning Zend_Form_Element decorators. What I need
to do is to add a certain html/js/whatever to the element.
I have my own composite decorator, which generates the html (the input
itself, label, description,..) and I am wondering how to do it to be
able to use:
$form_element->setWhatever('foo');
to render 'whatever' in the custom decorator. To do this, I would need
to extend every Zend_Form_Element to implement setWhatever().
So the logical step to do would be to get the decorator, set the
parameter to the decorator and render accordingly. Like this:
$form_element->getDecorator()->setWhatever('foo');
but still I am not so sure this is the right approach. Is there any
other way to solve this?
Thanks for replies,
Jan Brucek