Removes format when changing to custom fields elements that doesn't need it

This commit is contained in:
Ivan Nieto Vivanco 2022-09-15 11:21:02 -05:00
parent 20220764bb
commit 41b75704e3

View file

@ -235,6 +235,10 @@ class CustomFieldsController extends Controller
$field->format = e($request->get('format')); $field->format = e($request->get('format'));
} }
if($field->element == 'checkbox' || $field->element == 'radio'){
$field->format = 'ANY';
}
if ($field->save()) { if ($field->save()) {
return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/message.field.update.success')); return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/message.field.update.success'));
} }