Additional components for the Symfony2 form components

Installs: 46 267

Dependents: 0

Stars: 16

Watchers: 2

Forks: 10

Open Issues: 1

Language: PHP

1.1.0 2013-08-30 20:20 UTC


This collection of classes add functionality to the Symfony2 Form component.


To install the form component simply add it to your composer.json requirements:

"require": {
        "lrotherfield/form": "1.1.x-dev",

And then run composer.phar update

Hidden entity type

To use the hidden entity type you need to register it as a service in your config.yml or a services.yml file:

        class: Lrotherfield\Component\Form\Type\HiddenEntityType
            - @doctrine.orm.entity_manager
            - { name: form.type, alias: hidden_entity }

You can use then use the type with the form builder:

public function buildForm(FormBuilderInterface $builder, array $options)
        ->add('example', 'hidden_entity', array(
                "class" => "Lrotherfield\\Bundle\\ExampleBundle\\Entity\\ExampleEntity"

The only additional requirement is the "class" option which must be a fully qualified namespace to the entity that you want to be used in the transformation