donglian4879
2013-11-21 10:17
浏览 16
已采纳

将标题标签添加到Zend_Form_Element_MultiCheckbox

I want to add a title tag to each checkbox of a Zend_Form_Element_MultiCheckbox, to use jquery tooltip.

I use zend 1.12.

here is the way I make my multicheckbox :

$orderValue = new Zend_Form_Element_MultiCheckbox(Frontend_Model_SiteDetail::CHAMP_ORDER_VALUE);
    $orderValue->setLabel($translate->_(Frontend_Model_VueSiteDetail_Parametres::CHAMP_ORDER_VALUE_TITLE))
                ->setMultiOptions(Frontend_Model_Enum_GroupOrder::getInstance()->getAll(true))
                ->setDecorators($decorateurs);

my decorator is :

    $decorateurs = array('Composite_Table');

I try something like this but it didn't work :

$orderValue->removeDecorator('HtmlTag');
    $orderValue->addDecorator('HtmlTag', array(
        'attribute' => 'title'
    ));
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doudong2149 2014-01-12 12:47
    已采纳

    I use this method:

    $orderValue->setAttrib('title', 'Tooltip');
    
    已采纳该答案
    打赏 评论

相关推荐 更多相似问题