Is it possible to use an Embedded form without using a separated class for it? The reason is I've got a lot of form classes already, which most of the time contain a single field, so I wonder if it is possible to define embedded forms inline.
So normally we have something like this:
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('name')
->add('email')
->add('phone')
->add('key', new KeyType())
;
}
The documentation says that I have to create a class for the key field, KeyType for example, where I would set up the form builder for the embedded form. But I would like to, instead of creating the class KeyType, define the fields inline, in the same class. How can I do that?