'--' ); foreach ($questionData['options'] as $key => & $value) { $options[$key] = $value; } $name = 'question'.$questionData['question_id']; $form->addSelect( $name, null, $options ); if (!empty($answers)) { $form->setDefaults([$name => $answers]); } } }