Version

Documentation » Admin

15. Form Help Messages and Descriptions »

« 13. Saving hooks

14. Form Types

14.2. Types options

14.2.1. General

  • label: You can set the label option to false if you don’t want to show it.
<?php
// src/AppBundle/Admin/PageAdmin.php

class PageAdmin extends AbstractAdmin
{
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
            ->add('status', null, array(
                'label' => false
            ))

            // ...
        ;
    }

    // ...
}

14.2.2. ChoiceType

  • sortable: This option can be added for multiple choice widget to activate select2 sortable.
<?php
// src/AppBundle/Admin/PageAdmin.php

class PageAdmin extends AbstractAdmin
{
    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
            ->add('multiChoices', 'choice', array(
                'multiple' => true,
                'sortable' => true,
            ))

            // ...
        ;
    }

    // ...
}

Found a typo? Something is wrong in this documentation? Just fork and edit it!