Skip to content

Commit 90f2a95

Browse files
committed
fix(abstractitiltarget): multiple tag questions set but not displayed in designer
1 parent a93f031 commit 90f2a95

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

inc/abstractitiltarget.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ function change_tag_type() {
11121112
'fieldtype' => ['tag'],
11131113
],
11141114
'_tag_questions',
1115-
$this->fields['tag_questions'],
1115+
explode(',', $this->fields['tag_questions']),
11161116
[
11171117
'multiple' => true,
11181118
]

inc/question.class.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ public static function getQuestionsFromFormBySection($form, $crit = []) {
10431043
* @param PluginFormcreatorForm $form
10441044
* @param array $crit
10451045
* @param string $name
1046-
* @param string $value
1046+
* @param string|array $value
10471047
* @param array $options
10481048
* @return string|int HTML output or random id
10491049
*/
@@ -1055,8 +1055,10 @@ public static function dropdownForForm($form, $crit, $name, $value = null, $opti
10551055
$options = $options + [
10561056
'display' => $options['display'] ?? true,
10571057
];
1058-
if ($value !== null) {
1058+
if (is_string($value)) {
10591059
$options['value'] = $value;
1060+
} else if (is_array($value)) {
1061+
$options['values'] = $value;
10601062
}
10611063
$output = Dropdown::showFromArray($name, $items, $options);
10621064

0 commit comments

Comments
 (0)