1
我需要装点Zend_Form_Element_MultiCheckbox成无序列表装潢Zend_Form_Element_MultiCheckbox,我可以<li>
得到每个项目环绕,通过设置setSeparator到</li><li>
和HtmlTag标签<li>
在一个无序列表
我只是得到找到任何围绕此列表设置<ul>
,任何人都能指出我正确的方向?
感谢您阅读(我的代码如下所示)
$interests = new Zend_Form_Element_MultiCheckbox('foo');
$interests->setSeparator('</li><li>');
foreach ($interestsTable->findForSelect() as $interest) { // For earch interest add an option
$interests->addMultiOption($interest->interest_id, $interest->interest);
}
// Decorate the interests
$interests->setDecorators(array(
array('ViewHelper'),
array('label', array(
'tag' => 'span' )),
array('HtmlTag', array(
'tag' => 'li', 'class' => 'interestOption'))
));
感谢奏效一种享受 - 我得到的是什么回事也是 – Timmeh 2009-12-04 11:15:15