From 2c80c2dea3fce6754d0a1567dbf3619ad0ada31e Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 17 Jun 2019 14:13:42 +0200 Subject: [PATCH] wip #2835 @1.5 --- src/resources/views/fields/tags.blade.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/resources/views/fields/tags.blade.php b/src/resources/views/fields/tags.blade.php index 5225461..ac19edb 100644 --- a/src/resources/views/fields/tags.blade.php +++ b/src/resources/views/fields/tags.blade.php @@ -1,3 +1,10 @@ +@php + $values=json_decode(old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '[]'); + if(!is_array($values)){ + $values=[]; + } +@endphp +
@@ -12,6 +19,9 @@ style="width: 100%" @include('crud::inc.field_attributes', ['default_class' => 'form-control select2_tags']) multiple> + @foreach($values as $value) + + @endforeach @if(isset($field['suffix']))
{!! $field['suffix'] !!}
@endif -- 2.39.5