开发者

In Zend SubForm, how do I set Legend escape to false?

开发者 https://www.devze.com 2023-01-23 12:46 出处:网络
I\'ve got a subform, where I set a legend. $dob = new Zend_Form_SubForm(); $dob->addElement($birthdayMonth)

I've got a subform, where I set a legend.

$dob = new Zend_Form_SubForm();
$dob->addElement($birthdayMonth)
->addElement($birthdayDay)
->setLegend('when is your birthday?');

How do I set the Legend so it won't escape the text?

Usually I'd get the decorator, but this doesn't work:

$decorator = $dob->getDecorator('Legend');
$decorator->setOption('escape'开发者_StackOverflow, false); 


You can set the Fieldset decorator, it passes it to the Legend field.

$dob->getDecorator('Fieldset')
    ->setOption('escape', false);
0

精彩评论

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