diff --git a/site/plugins/form/app/Controllers/FormController.php b/site/plugins/form/app/Controllers/FormController.php index 7f69cddb..54542bfd 100644 --- a/site/plugins/form/app/Controllers/FormController.php +++ b/site/plugins/form/app/Controllers/FormController.php @@ -535,6 +535,8 @@ class FormController extends Controller $name = isset($properties['name']) ? $properties['name'] : $field_name; $current_value = isset($properties['value']) ? $properties['value'] : $field_value; + $current_value = array_map('trim', explode(',', $current_value)); + return $this->flextype['view']->fetch('plugins/form/templates/fields/tags/field.html', ['title' => $title, 'size' => $size, 'name' => $name, 'id' => $id, 'class' => $class, 'help' => $help , 'options' => $options, 'current_value' => $current_value]); } diff --git a/site/plugins/form/templates/fields/tags/field.html b/site/plugins/form/templates/fields/tags/field.html index b779a6e9..2d5d1f42 100644 --- a/site/plugins/form/templates/fields/tags/field.html +++ b/site/plugins/form/templates/fields/tags/field.html @@ -1,11 +1,12 @@