1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-15 01:24:25 +02:00

feat(form-plugin): add ability to work with string field for select2

This commit is contained in:
Awilum
2020-02-29 14:12:45 +03:00
parent 7ee601ab8d
commit e05846f4ee

View File

@@ -535,8 +535,10 @@ 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));
if (! empty($current_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]);
}