开发者

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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜