Skip to content

Commit

Permalink
fix(abstractitiltarget): multiple tag questions set but not displayed…
Browse files Browse the repository at this point in the history
… in designer
  • Loading branch information
btry committed Jan 6, 2023
1 parent a93f031 commit 90f2a95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/abstractitiltarget.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ function change_tag_type() {
'fieldtype' => ['tag'],
],
'_tag_questions',
$this->fields['tag_questions'],
explode(',', $this->fields['tag_questions']),
[
'multiple' => true,
]
Expand Down
6 changes: 4 additions & 2 deletions inc/question.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ public static function getQuestionsFromFormBySection($form, $crit = []) {
* @param PluginFormcreatorForm $form
* @param array $crit
* @param string $name
* @param string $value
* @param string|array $value
* @param array $options
* @return string|int HTML output or random id
*/
Expand All @@ -1055,8 +1055,10 @@ public static function dropdownForForm($form, $crit, $name, $value = null, $opti
$options = $options + [
'display' => $options['display'] ?? true,
];
if ($value !== null) {
if (is_string($value)) {
$options['value'] = $value;
} else if (is_array($value)) {
$options['values'] = $value;
}
$output = Dropdown::showFromArray($name, $items, $options);

Expand Down

0 comments on commit 90f2a95

Please sign in to comment.