From e4a5d599a2ff147d21c3c2ac7f52b70a87ae93d8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 28 Feb 2018 13:41:13 +0100 Subject: [PATCH] * All apps: multiselect custom-field switches to single select after submit --- api/src/Etemplate/Widget/Customfields.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/Customfields.php b/api/src/Etemplate/Widget/Customfields.php index 7f54978184..b3f1691cfe 100644 --- a/api/src/Etemplate/Widget/Customfields.php +++ b/api/src/Etemplate/Widget/Customfields.php @@ -327,7 +327,7 @@ class Customfields extends Transformer if (substr($type, 0, 7) !== 'select-' && $type != 'ajax_select') break; // fall-through for all select-* widgets case 'select': - $this->attrs['multiple'] = $field['rows'] > 1; + $widget->attrs['multiple'] = $field['rows'] > 1; // fall through case 'radio': if (count($field['values']) == 1 && isset($field['values']['@'])) @@ -390,7 +390,7 @@ class Customfields extends Transformer $customfields =& $this->getElementAttribute(self::GLOBAL_VALS, 'customfields'); if(is_array($value_in)) { - foreach($value_in as $field => $value) + foreach(array_keys($value_in) as $field) { $field_settings = $customfields[$fname=substr($field,1)];