addColumn('no', 'no'); $this->addColumn( 'date', 'added', array('title' => 'Submitted', 'orderBy' => 'added', 'format' => '%m/%d/%Y %I:%M %p') ); $this->addColumn('text', 'name', array('orderBy' => 'name')); $this->addColumn( 'text', 'email', array( 'title' => 'Email Address', 'orderBy' => 'email', 'defaultText' => $this->getConfig('emptyFieldText') ) ); $this->addColumn( 'text', 'phone', array( 'title' => 'Phone Number', 'orderBy' => 'phone', 'defaultText' => $this->getConfig('emptyFieldText') ) ); if ($this->_hasReason) { $this->addColumn('text', 'reasonTitle', array('title' => 'Reason for Contact', 'orderBy' => 'reasonTitle')); } if ($this->_hasFoundUs) { $this->addColumn('text', 'foundUsTitle', array( 'title' => 'Hear about us?', 'orderBy' => 'foundUsTitle', 'defaultText' => '-' )); } $this->addColumn('options', 'options', array('actions' => 'view; delete')); return $this; } public function setHasReason($hasReason) { $this->_hasReason = $hasReason; return $this; } public function setHasFoundUs($value) { $this->_hasFoundUs = (bool) $value; return $this; } }