Version

Documentation » Admin

16. Form Help Messages and Descriptions »

« 14. Saving hooks

15. Form Types

15.2. Types options

15.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
            ))

            // ...
        ;
    }

    // ...
}

15.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!