addElement('hidden', 'idPost'); if (!$this->_getData('identity')) { $this->addElement('text', 'author', array('label' => 'Author', 'required' => true)); $this->addElement( 'email', 'email', array('label' => 'Email (will not be published)', 'required' => true) ); $this->getElement('email')->getDecorator('label')->setOption('escape', false); } $this->addElement('textarea', 'content', array('label' => 'Comment', 'required' => true)); return $this; } protected function _initButtons() { $this->addElement( 'submit', 'btnSubmit', array( 'label' => 'Submit Comment', 'attribs' => array('class' => 'btn'), 'decorators' => array('ViewHelper') ) ); $this->addDisplayGroup(array('btnSubmit'), 'submitGroup'); return $this; } }