public function __construct($id, $label, $options, $value, $page_no = 1, $is_primary = false, $extra_opts = null) { if (isset($options['value'])) { if (!is_array($options['value'])) { $options['value'] = RM_Utilities::trim_array(explode(',', $options['value'])); } else { $options['value'] = $options['value']; } } parent::__construct($id, 'Select', $label, $options, $value, $page_no, $is_primary, $extra_opts); if (isset($options['multiple'])) { $multiple = $options['multiple']; } else { $multiple = ''; } $options = array(); if (!is_array($value)) { $tmp_options = RM_Utilities::trim_array(explode(',', $value)); } else { $tmp_options = $value; } foreach ($tmp_options as $val) { $options[$val] = trim($val); } if ($multiple == 'multiple') { $options = array(null => RM_UI_Strings::get('SELECT_FIELD_MULTI_OPTION')) + $options; } else { $options = array(null => RM_UI_Strings::get('SELECT_FIELD_FIRST_OPTION')) + $options; } $this->field_value = $options; }
public function __construct($id, $label, $options, $value, $page_no = 1, $is_primary = false, $extra_opts = null) { parent::__construct($id, 'Radio', $label, $options, $value, $page_no, $is_primary, $extra_opts); }