symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

[Form] Example of customizing EnumType labels

Open robinbrisa opened this issue 2 years ago • 0 comments

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.

robinbrisa avatar Aug 10 '22 16:08 robinbrisa