symfony-docs
symfony-docs copied to clipboard
[Form] Example of customizing EnumType labels
Default behavior when creating a EnumType form element is that the choice labels displayed to the user are the enum names.
This PR adds an example of how to use a function inside an enum to return labels and how to bind this function to the form element.