From 41b75704e384461350a24dd87e6f0e70c2f0a941 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 15 Sep 2022 11:21:02 -0500 Subject: [PATCH] Removes format when changing to custom fields elements that doesn't need it --- app/Http/Controllers/CustomFieldsController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/CustomFieldsController.php b/app/Http/Controllers/CustomFieldsController.php index da4bd08550..43540ed421 100644 --- a/app/Http/Controllers/CustomFieldsController.php +++ b/app/Http/Controllers/CustomFieldsController.php @@ -235,6 +235,10 @@ class CustomFieldsController extends Controller $field->format = e($request->get('format')); } + if($field->element == 'checkbox' || $field->element == 'radio'){ + $field->format = 'ANY'; + } + if ($field->save()) { return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/message.field.update.success')); }