Open rudiedirkx opened 8 years ago
Could be issue with passing an instance as class instead of FQCN. Try initializing TranslationForm and than setting it as a class. It will probably do the same thing. I'll look into it, thanks.
That doesn't seem to be the problem. This works:
$formObject = $this->formBuilder->create(TranslationForm::class);
$this->add('translations4', 'collection', [
'type' => 'form',
'data' => $this->data['collection'],
'options' => [
'class' => $formObject,
'label' => 'Translation',
],
]);
so it only fails for the plain form object. A named form works with both methods: FQCN and object.
The workaround is very easy luckily: always always use a dedicated class, even for tiny forms.
Still broken, but way to complex for my little brain. Work-around is super easy: don't use plain forms.
Snippets:
The collection:
The form:
Output:
That's the 1st item being used 3 times. It has something to do with the plain form, because FQCN works:
And so does a named form object: