From daca017d96b6f647b9385d9fce686cbcb4db9b38 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 18 Apr 2024 18:55:26 +0200 Subject: [PATCH] Set hasEmptyOption --- .../2024_04_16_233540_add_allowcustom_field.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/database/migrations/2024_04_16_233540_add_allowcustom_field.php b/database/migrations/2024_04_16_233540_add_allowcustom_field.php index 3dd007e7..96b1b6aa 100644 --- a/database/migrations/2024_04_16_233540_add_allowcustom_field.php +++ b/database/migrations/2024_04_16_233540_add_allowcustom_field.php @@ -19,8 +19,8 @@ return new class extends Migration /** @var Collection */ $fields = $section->fields; $section->fields = collect($fields)->map(function ($field) { - if ($field->type === 'DropdownField' || $field->type === 'RadioField') { - $field->allowcustom = false; + if ($field->type === 'GroupField') { + $field->hasEmptyOption = false; } return $field; })->all(); @@ -36,8 +36,8 @@ return new class extends Migration /** @var Collection */ $fields = $section->fields; $section->fields = collect($fields)->map(function ($field) { - if ($field->type === 'DropdownField' || $field->type === 'RadioField') { - $field->allowcustom = false; + if ($field->type === 'GroupField') { + $field->hasEmptyOption = false; } return $field; })->all();