Trying to use sonata_type_choice_field_mask as define in the documentation https://sonata-project.org/bundles/admin/3-x/doc/reference/form_types.html
The property empty_value seems to not be surported anymore, I get this error.
The option "empty_value" does not exist. Defined options are: "action", "allow_extra_fields", "attr", "auto_initialize", "block_name", "by_reference", "choice_attr", "choice_label", "choice_loader", "choice_name", "choice_translation_domain", "choice_value", "choices", "choices_as_values", "compound", "constraints", "csrf_field_name", "csrf_message", "csrf_protection", "csrf_token_id", "csrf_token_manager", "data", "data_class", "disabled", "empty_data", "error_bubbling", "error_mapping", "expanded", "extra_fields_message", "group_by", "horizontal_input_wrapper_class", "horizontal_label_class", "horizontal_label_offset_class", "inherit_data", "invalid_message", "invalid_message_parameters", "label", "label_attr", "label_format", "label_render", "map", "mapped", "method", "multiple", "placeholder", "post_max_size_message", "preferred_choices", "property_path", "required", "sonata_admin", "sonata_field_description", "sonata_help", "sortable", "translation_domain", "trim", "upload_max_size_message", "validation_groups".
Maybe it should be placeholder ? http://symfony.com/doc/current/reference/forms/types/choice.html#placeholder ? Or empty_data
This add a new choice :(
What about empty_data? Not sure what you are trying to do btw…
In fact I wanted to add a kind of placeholder and I assume this is what empty_value was for.
Anyway if I opened this issue it's more to notice this error from the doc more than to get a solution :)
So… placeholder doesn't do just that? If it does, can you make a PR to fix the docs?
I can just delete the empty_value reference since I don't know what it did
let me cd ~/dev/symfony-docs and do git log -S empty_value -p
The
placeholderoption was introduced in Symfony 2.6 and replacesempty_value, which is available prior to 2.6.
So you can purely and simply replace empty_value with placeholder, and if you do, please grep for it in the entire repo.
ok I will
Thanks a lot for contributing!
I don't think so, b/c it will break projects of sf 2.3 users. Should be done on master though.
Most helpful comment
let me
cd ~/dev/symfony-docsand dogit log -S empty_value -p