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
Post a Comment