Zend_Form_Element_Hidden not really hidden

The point of having a hidden field is that it is truly hidden, and doesn’t require labels / etc. Unfortunately, Zend_Form_Element_Hidden doesn’t really recognise this. Here’s how to subclass it and get rid of that stuff so you can create an input that is hidden for real:

class M_Form_Element_Hidden extends Zend_Form_Element_Hidden {
   public function init() {
      return parent::init();
  1. No comments yet.

  1. No trackbacks yet.