dev-master
9999999-devA Symfony2 Bundle provide some extra form types.
MIT
The Requires
- php >=5.4.0
- symfony/symfony >=2.4
by Roni Saha
symfony2 form type hidden entity
A Symfony2 Bundle provide some extra form types.
A Symfony2 Bundle provide some extra form type., (*1)
Add EasyFormBundle in your composer.json:, (*2)
{ "require": { "xiidea/easy-form-bundle": "dev-master" } }
Now tell composer to download the bundle by running the command:, (*3)
``` bash $ php composer.phar update xiidea/easy-form-bundle, (*4)
Composer will install the bundle to your project's `vendor/xiidea` directory. ### 2. Enable the Bundle ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Xiidea\EasyFormBundle\XiideaEasyFormBundle(), ); }
Now you can use the registered types in ordinary way. currently available types are:, (*5)
hidden_entity, (*6)
you can add a "hidden_entity" field to the form as follow:, (*7)
$builder ->add('fieldName', 'hidden_entity', array( 'class' => 'Acme\DemoBundle\Entity\YourEntity' ));
A Symfony2 Bundle provide some extra form types.
MIT
symfony2 form type hidden entity