Closed
Description
If i have this FormType, for EntityA :
class FormTypeA extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('my_collection', CollectionType::class, [
'entry_type' => FormTypeB::class
]);
}
}
And this one, for EntityB :
class FormTypeB extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('field', TextAreaType::class, [
'disabled' => true
]);
}
}
When i submit my form, "all" EntityB are removed from my database => that's not what i expect, i just want to not save any modification on "field".
If i add another field into FormTypeB, "who is not disabled", nothing is removed, disabled does it's job (don't save any modification into this disabled field), that's fine.
If i add another field into FormTypeB, "who is disabled", same problem : when i submit my form, "all" EntityB are removed from my database => that's not what i expect