Symfony2, Sonata: Collapsed group
I'm trying to do something relatively simple, but it doesn't work.
I want to be able to collapse groups in a sonata to improve the user experience.
->with('MyGroup', array('collapsed' => true))
-add('MyField')
->end();
This is based on Sonata documentation.
Pretty simple, but I don't understand why it doesn't work. Is the array ('collapsed' => true) not enough?
This is problem?
source to share
The dropped option seems to have been removed in the latest version of Sonata:
-
in 2.1 is available https://github.com/sonata-project/SonataAdminBundle/blob/2.1/Resources/views/CRUD/base_edit_form.html.twig#L21
-
in 2.2, and the latter is not, there is only one link collapsed in the file which is for the css class. https://github.com/sonata-project/SonataAdminBundle/blob/2.2/Resources/views/CRUD/base_edit_form.html.twig#L41
Changelog 2.2: https://github.com/sonata-project/SonataAdminBundle/blob/master/UPGRADE-2.2.md
source to share