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:
@@ -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]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user