( 6 months ago )
I'm facing a problem with Symfony3 and forms.
I have a Parent form with an embedded Child form. From the controller, I can send data I can use in the Parent form with the $options array ($options['varA'], ...).
$form = $this->createForm(ParentEntityType::class, $objParent, array('varA'=>$varA, 'varB'=>$varB));
But what if I want to pass the varB variable (for example) to the embedded form ? What's the proper solution ?
Any help will be appreciated, thanks.