From 8d36971c8bfb9d9a8de86b03785000b138422c47 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 30 Nov 2022 16:21:23 -0600 Subject: [PATCH] Properly select 'CUSTOM REGEX' from the select list if the format declares onee --- resources/views/custom_fields/fields/edit.blade.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/views/custom_fields/fields/edit.blade.php b/resources/views/custom_fields/fields/edit.blade.php index b9b9715a2..35f3e1b89 100644 --- a/resources/views/custom_fields/fields/edit.blade.php +++ b/resources/views/custom_fields/fields/edit.blade.php @@ -74,8 +74,14 @@ + @php + $field_format = ''; + if (stripos($field->format, 'regex') === 0){ + $field_format = 'CUSTOM REGEX'; + } + @endphp
- {{ Form::select("format",Helper::predefined_formats(), $field->format, array('class'=>'format select2 form-control', 'aria-label'=>'format')) }} + {{ Form::select("format",Helper::predefined_formats(), ($field_format == '') ? $field->format : $field_format, array('class'=>'format select2 form-control', 'aria-label'=>'format')) }} {!! $errors->first('format', '') !!}