diff --git a/src/FragmentService/AbstractFragmentService.php b/src/FragmentService/AbstractFragmentService.php index 8d9930e5..160e8690 100644 --- a/src/FragmentService/AbstractFragmentService.php +++ b/src/FragmentService/AbstractFragmentService.php @@ -16,6 +16,7 @@ use Sonata\AdminBundle\Form\FormMapper; use Sonata\ArticleBundle\Model\FragmentInterface; use Sonata\Form\Validator\ErrorElement; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\OptionsResolver\OptionsResolver; /** @@ -46,7 +47,7 @@ final public function buildCreateForm(FormMapper $form, FragmentInterface $fragm public function buildEditForm(FormMapper $form, FragmentInterface $fragment): void { // Add BO title - $form->add('backofficeTitle'); + $form->add('backofficeTitle', TextType::class, ['empty_data' => '']); $this->buildForm($form, $fragment); }