【发布时间】:2016-09-08 18:19:45
【问题描述】:
UPD:已解决 - 添加了额外的装饰器。
我需要得到以下结果:
<dd id="daily_722-element">
<input id="daily_722" type="checkbox" name="daily_722" value="1">
<span> some text </span>
</dd>
我需要将 "some text" 用 html 标签包裹在复选框之后,但在 /DD 之前(不是之后)!
我目前的代码如下:
$chk = new Zend_Form_Element_Checkbox('daily_shit');
$chk->setLabel('<span class="dt-note">'. $firstName. '</span>');
$chk->getDecorator('label')->setOption('escape', false);
所以它产生:
<dd id="daily_722-element">
<input id="daily_722" type="checkbox" name="daily_722" value="1">
</dd>
而且我不知道如何在复选框之后注入额外的 HTML...但是在 DD 中
【问题讨论】:
标签: php html zend-framework zend-form-element zend-form-collection