【发布时间】:2011-06-27 03:39:01
【问题描述】:
我想做一个这样的:
<div><input type="checkbox" /> <label>Check this</label></div>
但不是这样的:
<div><label>Check this</label><input type="checkbox" /></div>
我尝试过这样做:
$stayInSystem->addDecorators(array(
'ViewHelper',
array('Label'),
array(array('row' => 'HtmlTag'), array('tag' => 'div',)),
))->setLabel('Check this');
提前致谢
【问题讨论】:
-
当你尝试这样做时发生了什么?
-
并尝试将
addDecorators替换为setDecorators。 -
所以,我解决了这个问题。刚刚添加:array('Label', array('placement' => 'append')).
标签: html zend-framework label decorator