在Zend SubForm中,如何将Legend转义设置为false?

时间:2010-11-03 13:50:22

标签: html escaping legend zend-form-sub-form

我有一个子表单,我设置了一个图例。

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

如何设置图例以使其不会脱离文本?

通常我会得到装饰者,但这不起作用:

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

1 个答案:

答案 0 :(得分:1)

您可以设置Fieldset装饰器,将其传递给Legend字段。

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