2

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

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

如何设置图例使其不会转义文本?

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

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

1 回答 1

1

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

$dob->getDecorator('Fieldset')
    ->setOption('escape', false);
于 2010-11-25T14:11:29.527 回答