html - 在 Zend SubForm 中,如何将 Legend escape 设置为 false?

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

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

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

如何设置 Legend 使其不会对文本进行转义?

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

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

最佳答案

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

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

关于html - 在 Zend SubForm 中,如何将 Legend escape 设置为 false?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4087681/

相关文章:

html - css3 导航高度不变

lua - Lua 中用单反斜杠替换输入中的双反斜杠

r - 如何转义R字符串中的反斜杠

r - ggplot + geom_point + 基于大小和颜色的图例

javascript - 使用动画删除 css 类

html - 表格单元格中的图像未按比例缩小 : using ie8/7

python - 如何在html中提取python列表变量的值?

c# - 如何将转义字符 '\' 写入代码

r - 如何向 ggplot 图例添加新的(自定义)变量

charts - jqplot图例的问题