I tried the following:

       $taElement = new Zend_Form_Element_Textarea('ta', array('required' =>
true, 'label' => 'Add a Comment'));
       $idElement = new Zend_Form_Element_Hidden('id', array('values' =>
$id));
       $memberElement = new Zend_Form_Element_Hidden('member_id',
array('values' => $this->member_id));
       $buttonElement = new Zend_Form_Element_Image('button', array('src' =>
'images/buttons/comment.png', 'value' => 'Add Comment'));
       $memberElement->removeDecorator('DtDdWrapper');
       $idElement->removeDecorator('DtDdWrapper'); 
       $buttonElement->removeDecorator('DtDdWrapper');
       $frm->addElements(array($wallElement, $memberElement, $tattooElement,
$buttonElement)); 

I also tried $idElement-> addDecorator('HtmlTag', array('tag' =>
'dd'))->removeDecorator('DtDdWrapper');

The form still shows the dt's and dd's on all elements.

Any other ideas on how to remove dt's and dd's from form elements?


Holger Lampe wrote:
> 
> I have a form element like this:
> 
>  
> 
> $checkbox = new Zend_Form_Element_Checkbox('thecheckbox');
> 
> $checkbox->setDescription('do this');
> 
>  
> 
> And I want following result:
> 
>  
> 
> <dd><input type="checkbox" name=" thecheckbox " id=" thecheckbox "
> value="1"
> /> do this</dd>
> 
>  
> 
> How do I achieve this?
> 
>  
> 
>  
> 
> Another question.
> 
> How do I remove the <dt></dt> from Zend_Form_Element_Submit,
> removeDecorator('label') doesn't seem to do the trick.
> 
>  
> 
> Cheers,
> 
> Holger
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Form---Description-tp16103893p19939574.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to