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() { if (!$this->_hasButtons) { return $this; } $this->addElement( 'submit', 'btnSubmit', array( 'label' => 'Submit Comment', 'attribs' => array('class' => 'btn') ) ); return $this; } }