Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

fix(283): add data normalizer option so empty string are not coverted… #284

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/FragmentService/AbstractFragmentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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);
}

Expand Down