get_lang('Horizontal'), 'vertical' => get_lang('Vertical') ); $this->getForm()->addRadio('horizontalvertical', get_lang('DisplayAnswersHorVert'), $options); $formData['horizontalvertical'] = isset($formData['horizontalvertical']) ? $formData['horizontalvertical'] : 'horizontal'; $config = array('ToolbarSet' => 'Survey', 'Width' => '100%', 'Height' => '120'); if (is_array($formData['answers'])) { foreach ($formData['answers'] as $key => $value) { $this->getForm()->addHtmlEditor('answers['.$key.']', null, false, false, $config); /* $this->html .= ' '; $this->html .= ' '; //$this->html .= ' '; //$this->html .= ' '.api_return_html_area('answers['.$key.']', api_html_entity_decode(stripslashes($form_content['answers'][$key]), ENT_QUOTES), '', '', null, ).''; $this->html .= ' '; if ($key<$total_number_of_answers-1) { $this->html .= ' '; } if ($key>0) { $this->html .= ' '; } if ($total_number_of_answers> 2) { $this->html .= ' '; } $this->html .= ' '; $this->html .= ' ';*/ } } $this->getForm()->setDefaults($formData); return parent :: add_remove_buttons($formData); } /** * @param FormValidator $form * @param array $questionData * @param array $answers */ public function render(FormValidator $form, $questionData = array(), $answers = array()) { if ($questionData['display'] == 'vertical') { $class = ''; } else { $class = 'inline'; } foreach ($questionData['options'] as $key => & $value) { /*if ($questionData['display'] == 'vertical') { $this->html .= '