diff --git a/packages/forms/src/Commands/FileGenerators/Concerns/CanGenerateModelForms.php b/packages/forms/src/Commands/FileGenerators/Concerns/CanGenerateModelForms.php index 6e267046550..9d0766e9fd5 100644 --- a/packages/forms/src/Commands/FileGenerators/Concerns/CanGenerateModelForms.php +++ b/packages/forms/src/Commands/FileGenerators/Concerns/CanGenerateModelForms.php @@ -108,7 +108,9 @@ public function getFormComponents(?string $model = null, array $exceptColumns = ) ); $componentData['options'] = [$options]; - $componentData['default'] = [$this->parseDefaultExpression($column, $model)]; + if ($column['default']) { + $componentData['default'] = [$this->parseDefaultExpression($column, $model)]; + } } if (str($componentName)->endsWith('_id')) {