'sorter ASC'); protected $_reorderTitleColumn = 'name'; protected $_formDefaults = array( 'show' => 'y' ); protected function _bindListColumns($list) { $list->addColumn('no', 'no') ->addColumn('text', 'name', array('orderBy' => 'name', 'title' => 'Client Name')) ->addColumn('text', 'testimonial', array('title' => 'Testimonial', 'truncateLength' => 255)) ->addColumn( 'link_enum', 'show', array('orderBy' => 'show', 'values' => array('y' => 'Yes', 'n' => 'No'))) ->addColumn('options', 'options'); return $this; } protected function _bindFormFields($form) { $form->addElement( 'text', 'name', array( 'label' => 'Client Name', 'required' => true, 'maxlength' => '50' ) ); $form->name->addValidator('StringLength', false, array('max' => 50)); $form->addElement( 'text', 'address', array( 'label' => 'Address', 'maxlength' => 255 ) ); $form->addElement( 'textarea', 'testimonial', array( 'label' => 'Testimonial', 'required' => true, 'rows' => 5, ) ); $form->addElement( 'checkbox', 'show', array( 'label' => 'Show', 'checkedValue' => 'y', 'uncheckedValue' => 'n', 'decoration' => 'simple', ) ); return $this; } }