I'am using a2lix/TranslationFormBundle with KnpLabs\DoctrineBehaviors.
I added translations field to my form :
$builder->add('translations', TranslationsType::class, [
'fields' => [
'content' => [
'field_type' => TextareaType::class,
'label' => 'admin.form.label.content',
'required' => true,
],
]
]);
Before using a2lix/TranslationFormBundle , I have :
Hello,
I'am using a2lix/TranslationFormBundle with KnpLabs\DoctrineBehaviors. I added translations field to my form : $builder->add('translations', TranslationsType::class, [ 'fields' => [ 'content' => [ 'field_type' => TextareaType::class, 'label' => 'admin.form.label.content', 'required' => true, ], ] ]);
Before using a2lix/TranslationFormBundle , I have :
[ ] $builder->get('content')->addModelTransformer(new HTMLTransformer());
[ ] $builder = $form->getConfig()->getFormFactory()->createNamedBuilder('subject', TextType::class, null,
['label' => 'admin.form.label.subject', 'auto_initialize' => false] );
How can I use addModelTransformer and createNamedBuilder with translated fields ?
Thanks.