public function configure() { $this->useFields(array('program_id', 'year', 'semester', 'course_type', 'status')); $programIdArray = Doctrine_Core::getTable('Program')->getProgramsByDepartmentId($this->departmentId); $this->widgetSchema['course_type'] = new sfWidgetFormChoice(array('choices' => FormChoices::getCourseTypeChoices())); $this->setValidator['course_type'] = new sfWidgetFormChoice(array('choices' => FormChoices::getCourseTypeChoices())); $this->widgetSchema['semester'] = new sfWidgetFormChoice(array('choices' => FormChoices::getSemesterChoices())); $this->setValidator['Semester'] = new sfWidgetFormChoice(array('choices' => FormChoices::getSemesterChoices())); $this->widgetSchema['year'] = new sfWidgetFormChoice(array('choices' => FormChoices::getYearChoices())); $this->setValidator['year'] = new sfWidgetFormChoice(array('choices' => FormChoices::getYearChoices())); $this->widgetSchema['program_id'] = new sfWidgetFormChoice(array('choices' => $programIdArray)); $this->setValidator['program_id'] = new sfWidgetFormChoice(array('choices' => $programIdArray)); }