/** * Hook that loads the form data from $_POST or the model * * Or from whatever other source you specify here. */ protected function loadFormData() { parent::loadFormData(); if ($this->createData && !$this->request->isPost()) { $this->formData = $this->trackEngine->getRoundDefaults() + $this->formData; } // Check the survey name $surveys = $this->util->getTrackData()->getAllSurveys(); if (isset($surveys[$this->formData['gro_id_survey']])) { $this->formData['gro_survey_name'] = $surveys[$this->formData['gro_id_survey']]; } else { // Currently required $this->formData['gro_survey_name'] = ''; } }