I have tried this code in my controller
$form = $this->createForm(new CentrexEdit2Type($ids), $centrex);
I want now to add the ids
form to my Form Builder:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$ids = $options['ids'];
.......
I failed on it Any ideas please?
Here I am joining the code:
if ($step==2){
$form = $this->createForm(new CentrexEdit1Type(), $centrex);
$ids=$form->get('bases')->getData();
}
foreach($ids as $id){echo($id->getId());}
if ($step==3){
$form = $this->createForm(new CentrexEdit2Type(array('ids'=>$ids)), $centrex);
}
I need $ids
when $step==3
, this is the problem.