Zend Framework: How do I remove the decorators on a Zend Form Hidden Element?

For hidden field you need only one decorator – ViewHelper:

$field = new Zend_Form_Element_Hidden('id');
$field->setDecorators(array('ViewHelper'));

This will render only the input field, without Dt-Dd wrapper and label.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)