Question

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'
    ));
Was it helpful?

Solution

I use this method:

$orderValue->setAttrib('title', 'Tooltip');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top