kematjaya / hidden-type-bundle
form type for hidden values
Installs: 1 839
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- doctrine/persistence: ^3.3
- symfony/config: ^6.0|^7.0
- symfony/dependency-injection: ^6.0|^7.0
- symfony/form: ^6.0|^7.0
- symfony/http-kernel: ^6.0|^7.0
- symfony/options-resolver: ^6.0|^7.0
- symfony/property-access: ^6.0|^7.0
- symfony/property-info: ^6.0|^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0
- symfony/var-dumper: ^6.0|^7.0
README
- Installation
composer require kematjaya/hidden-type-bundle
- usage
<?php
namespace App\Form;
...
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Kematjaya\HiddenTypeBundle\Type\HiddenDateTimeType;
use Kematjaya\HiddenTypeBundle\Type\HiddenEntityType;
...
class FooType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('created_at', HiddenDateTimeType::class)
->add('store', HiddenEntityType::class, [
'class' => \App\Entity\Store::class
]);
}
}