Merge pull request #1459 from jloguercio/1.11.x

Fix Dropdown survey question type results saving
pull/2487/head
José Loguercio 9 years ago committed by GitHub
commit 8714edb71a
  1. 4
      main/survey/ch_dropdown.php

@ -33,8 +33,8 @@ class ch_dropdown extends survey_question
public function render(FormValidator $form, $questionData = array(), $answers = '')
{
$name = 'question' . $questionData['question_id'];
array_unshift($questionData['options'], '--');
$form->addSelect($name, null, $questionData['options']);
$data = array(0 => '--') + $questionData['options'];
$form->addSelect($name, null, $data);
if (!empty($answers)) {
$form->setDefaults([$name => $answers]);
}

Loading…
Cancel
Save