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 96b1b6aa..3dd007e7 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 === 'GroupField') { - $field->hasEmptyOption = false; + if ($field->type === 'DropdownField' || $field->type === 'RadioField') { + $field->allowcustom = 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 === 'GroupField') { - $field->hasEmptyOption = false; + if ($field->type === 'DropdownField' || $field->type === 'RadioField') { + $field->allowcustom = false; } return $field; })->all();