2017 © Pedro Peláez
 

symfony-bundle symfony-fieldset-bundle

Fieldset Type in Symfony Forms

image

adamquaile/symfony-fieldset-bundle

Fieldset Type in Symfony Forms

  • Wednesday, May 24, 2017
  • by adamquaile
  • Repository
  • 2 Watchers
  • 17 Stars
  • 12,425 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 10 Forks
  • 6 Open issues
  • 6 Versions
  • 10 % Grown

The README.md

Symfony Forms Fieldset Type

Adds a fieldset type to a symfony project., (*1)

Installation

Install via composer from adamquaile/symfony-fieldset-bundle., (*2)

Register in app/AppKernel.php:, (*3)

public function registerBundles()
{
    $bundles = array(
        // ...
        new AdamQuaile\Bundle\FieldsetBundle\AdamQuaileFieldsetBundle(),
    );

    //...
}

Usage

Use with normal form builder methods:, (*4)

// A fieldset with your fields defined in a callback function
$builder->add('my_group_example_one', FieldsetType::class, [
    'label' => false, // You probably don't want a label as well as a legend.
    'legend' => 'Your fieldset legend',
    'fields' => function(FormBuilderInterface $builder) {
        $builder->add('first_name', TextType::class, [
            'label' => 'First Name'
        ]);
        $builder->add('last_name', TextType::class, [
            'required'  => false,
            'label'     => 'Surname'
        ]);
    }
]);

// A fieldset with your fields defined in an array
$builder->add('my_group_example_two', FieldsetType::class, [
    'label' => false,
    'legend' => 'Your fieldset legend',
    'fields' => [
        [
            'name'  => 'first_name',
            'type'  => TextType::class,
            'attr'  => [
                'label' => 'First Name'
            ]
        ],
        [
            'name'  => 'last_name',
            'type'  => TextType::class,
            'attr'  => [
                'required'  => false,
                'label'     => 'Surname'
            ]
        ]
    ]
]);

The Versions

24/05 2017

dev-master

9999999-dev

Fieldset Type in Symfony Forms

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

symfony forms fieldset

24/05 2017

v1.1.3

1.1.3.0

Fieldset Type in Symfony Forms

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

symfony forms fieldset

23/12 2016

dev-feature/symfony-3-support

dev-feature/symfony-3-support

Fieldset Type in Symfony Forms

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

symfony forms fieldset

07/11 2014

1.1.0

1.1.0.0

Fieldset Type in Symfony Forms

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

symfony forms fieldset

18/05 2014

1.0.0

1.0.0.0

Fieldset Type in Symfony Forms

  Sources   Download

MIT

The Requires

  • php >=5.4

 

symfony forms fieldset

18/05 2014

0.0.0

0.0.0.0

Fieldset Type in Symfony Forms

  Sources   Download

MIT

The Requires

  • php >=5.4

 

symfony forms fieldset