bedomon
bedomon

Reputation: 350

Add title tag to 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'
    ));

Upvotes: 0

Views: 172

Answers (1)

Stafox
Stafox

Reputation: 1005

I use this method:

$orderValue->setAttrib('title', 'Tooltip');

Upvotes: 1

Related Questions