php - How to add custom HTML Tag with Zend Form Description -


consider display

checkbox, checkbox label , image there after.

how can create view same using zend engine form

i tried follows

    $this->addelement(             'checkbox',             "$key",             array(              'label'=>$value,                 'checkedvalue' => "$key",                 'uncheckedvalue' => '',                 'checked' => true,              'disabled' => false,           )         );       $element = $this->getelement($key);                   $element->setdecorators(    array(      'viewhelper',      array('label', array('tag' => 'dt', 'class'=>'hidden')),      array('description',array('escape'=>false,'tag'=>' span')), //escape false because want html output     )    );       $element->setdescription('<img name="help_'.$key.'" id="help_'.$key.'" src="/application/modules/user/externals/images/what-is-this.gif"/>');  $element->setdescription('<img name="help_'.$key.'" id="help_'.$key.'" src="/application/modules/user/externals/images/what-is-this.gif"/>'); 

but showing checkbox, description image , checkbox label superscript.

any please

$element->getdecorator('description')->setescape(false); 

this prevent escaping description content.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -