CraueFormFlowBundle
CraueFormFlowBundle copied to clipboard
Dynamic load of Form Class
trafficstars
Is there an easy way to dynamically change the form used by a specific step
For instance if my third step can be one of several different but is dependant of the value chosen on the second one. Which feature do I have to use to achieve that ?
I tried this :
'form_type' => function(FormFlowInterface $flow) {
return $flow->getFormData()->getType();
}
but it doesn't like having a closure, same goes with
'form_type' => $this->getFormData()->getType()
The thing the entity seems to be always null for some reason