How do I set an Attrib to the label and not the element in a zend form
Usually I would set up a send element by using the following
$question = new Zend_Form_Element_Text ("question");
$question->setLabel("Question")
->setAttrib开发者_运维百科('class', 'bob');
Here I have set a class around an element but how do I set it for the label instead?
From ZF Documentation:
$label = $element->getDecorator('label');
$label->setOption('class', 'bob');
精彩评论