I have a Symfony2 form with a variety of fields, including one optional text field called recap.
recap
This recap field saves perfectly when there\'s
I have another solution for this issue:
create dummy class
class EmptyString { public function __toString() { return ''; } }
and set
$builder->add('recap', 'text', [ 'empty_data' => new EmptyString(), ]);
When entity will be stored to DB, it will automatically converted to empty string.