parent
82ca68fef0
commit
a07327dbc5
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class PostType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TextType::class)
|
||||
->add('text', TextareaType::class)
|
||||
->add('dream', CheckboxType::class)
|
||||
// ->add('tags', ChoiceType::class, [
|
||||
// "multiple" => true
|
||||
// ])
|
||||
->add('submit', SubmitType::class)
|
||||
;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
{{ form(form) }}
|
Loading…
Reference in new issue