public function overviewAction(
        Request $request,
        FormFactoryInterface $formFactory,
        ExtraFormBuilderInterface $extraFormBuilder
    ) {
        $formName = 'overview';
        $data = $request->request->get($formName);
        $configurationRaw = $data['configuration'];
        $configuration = json_decode($configurationRaw, true);

        $overviewBuilder = $formFactory
            ->createNamedBuilder($formName)
            ->setAction($this->generateUrl('idci_extra_form_editor_overview'))
            ->add('configuration', HiddenType::class, array(
                'data' => $configurationRaw,
            ))
        ;

        $form = $extraFormBuilder
            ->build($configuration, array(), array(), $overviewBuilder)
            ->add('submit', SubmitType::class)
            ->getForm()
        ;

        // The form overview has been submitted
        if (count($data) > 1) {
            $form->handleRequest($request);
            if ($form->isValid()) {
                return new Response('This form was well submitted');
            }
        }

        // Render the form with or without errors
        return $this->render('@IDCIExtraForm/Editor/overview.html.twig', array(
            'form' => $form->createView(),
        ));
    }
public function overviewAction(
        Request $request,
        FormFactoryInterface $formFactory,
        ExtraFormBuilderInterface $extraFormBuilder
    ) {
        $formName = 'overview';
        $data = $request->request->get($formName);
        $configurationRaw = $data['configuration'];
        $configuration = json_decode($configurationRaw, true);

        $overviewBuilder = $formFactory
            ->createNamedBuilder($formName)
            ->setAction($this->generateUrl('idci_extra_form_editor_overview'))
            ->add('configuration', HiddenType::class, array(
                'data' => $configurationRaw,
            ))
        ;

        $form = $extraFormBuilder
            ->build($configuration, array(), array(), $overviewBuilder)
            ->add('submit', SubmitType::class)
            ->getForm()
        ;

        // The form overview has been submitted
        if (count($data) > 1) {
            $form->handleRequest($request);
            if ($form->isValid()) {
                return new Response('This form was well submitted');
            }
        }

        // Render the form with or without errors
        return $this->render('@IDCIExtraForm/Editor/overview.html.twig', array(
            'form' => $form->createView(),
        ));
    }
public function overviewAction ( Request $ request , FormFactoryInterface $ formFactory , ExtraFormBuilderInterface $ extraFormBuilder ) { $ formName = 'overview' ; $ data = $ request -> request -> get ( $ formName ) ; $ configurationRaw = $ data [ 'configuration' ] ; $ configuration = json_decode ( $ configurationRaw , true ) ; $ overviewBuilder = $ formFactory -> createNamedBuilder ( $ formName ) -> setAction ( $ this -> generateUrl ( 'idci_extra_form_editor_overview' ) ) -> add ( 'configuration' , HiddenType :: class , array ( 'data' => $ configurationRaw , ) ) ; $ form = $ extraFormBuilder -> build ( $ configuration , array ( ) , array ( ) , $ overviewBuilder ) -> add ( 'submit' , SubmitType :: class ) -> getForm ( ) ; // The form overview has been submitted if ( count ( $ data ) > 1 ) { $ form -> handleRequest ( $ request ) ; if ( $ form -> isValid ( ) ) { return new Response ( 'This form was well submitted' ) ; } } // Render the form with or without errors return $ this -> render ( '@IDCIExtraForm/Editor/overview.html.twig' , array ( 'form' => $ form -> createView ( ) , ) ) ; }
Overview action.

@Route("/overview", name="idci_extra_form_editor_overview", methods={"POST"})
Overview action .