'Pending', 'approved' => 'Approved', 'disapproved' => 'Disapproved', 'spam' => 'Spam', ); protected function _initElements() { $this->addElement('hidden', 'idPost'); $this->addElement( 'select', 'status', array( 'label' => 'Status', 'required' => true, 'multiOptions' => self::$commentStatuses, 'value' => 'pending' ) ); $this->addElement('text', 'author', array('label' => 'Author', 'required' => true)); $this->addElement('email', 'email', array('label' => 'Email')); $this->addElement( 'date', 'postingDate', array('label' => 'Post Date', 'required' => true, 'value' => date('Y-m-d')) ); $this->addElement( 'time', 'postingTime', array('label' => 'Post Time', 'required' => true, 'value' => date('H:i:s')) ); $this->addElement('textarea', 'content', array('label' => 'Comment', 'required' => true)); $this->addElement( 'text', 'ipAddress', array('label' => 'IP Address', 'filters' => array('StringTrim'), 'validators' => array('Ip')) ); $this->addElement('text', 'userAgent', array('label' => 'User Agent')); $this->addElement('text', 'referer', array('label' => 'Referring URL')); return $this; } }