symfonyyamlsymfony2-easyadmineasyadmin

how to remove property label in new and edit actions?


I use the easyadmin bundle in my symfony app for backend management.

I'd like to remove the label from some fields in the edit and the new view. I tried to use the same behaviour as in formbuilder :

form:
    fields:
        - {property: toto, label: false }

but the label is still displayed. Anyone knows the syntax to remove it ?


Solution

  • Some are still arguing on github to know if it has to be considered as a bug or not. Anyways a solution already exists.

    Fixes

    To remove the label in easyAdim-bundle, you need to do as for the formbuilder of Symfony where you can remove the label with options. To modify the formbuilder in easy-admin you use the type_options option. It goes the same for the label :

    form:
        fields:
            - {property: toto, type_options: {label: false} }
    

    will display a form_row with an empty label, without css, without Js and without empty labels