Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Closed
Description
Q | A |
---|---|
Bug report? | yes |
Symfony version | 3.2.4 |
Hello.
I am getting null value after passing empty string to symfony form field.
After defining empty_data in form builder, the problem has gone:
$builder ->add('name', TextType::class, [ 'empty_data' => '', ])
But documentation claims that empty_data is empty string ('') by default. So either the documentation should be changed or behavior of form field type.
Link to docs:http://symfony.com/doc/current/reference/forms/types/text.html#empty-data
Thanks.