Controller/TemplateController.php
public function formAction(Request $request)
    {
        $widths = [];
        foreach ($this->getParameter('sulu_form.dynamic_widths') as $id => $name) {
            $widths[] = [
                'id' => $id,
                'name' => $name,
            ];
        }

        $types = $this->get('sulu_form.dynamic.form_field_type_pool')->all();
        $receiverTypes = [
            'to' => HelperInterface::MAIL_RECEIVER_TO,
            'cc' => HelperInterface::MAIL_RECEIVER_CC,
            'bcc' => HelperInterface::MAIL_RECEIVER_BCC,
        ];

        return $this->render(
            'SuluFormBundle:forms:template.html.twig',
            [
                'types' => $this->getSortedTypes($types),
                'widths' => $widths,
                'receiverTypes' => $receiverTypes,
                'locale' => $request->get('locale', $request->getLocale()),
                'autoTitle' => $this->getParameter('sulu_form.dynamic_auto_title'),
                'fallbackEmails' => [
                    'from' => $this->getParameter('sulu_form.mail.from'),
                    'to' => $this->getParameter('sulu_form.mail.to'),
                ],
            ]
        );
    }
public function formAction(Request $request)
    {
        $widths = [];
        foreach ($this->getParameter('sulu_form.dynamic_widths') as $id => $name) {
            $widths[] = [
                'id' => $id,
                'name' => $name,
            ];
        }

        $types = $this->get('sulu_form.dynamic.form_field_type_pool')->all();
        $receiverTypes = [
            'to' => HelperInterface::MAIL_RECEIVER_TO,
            'cc' => HelperInterface::MAIL_RECEIVER_CC,
            'bcc' => HelperInterface::MAIL_RECEIVER_BCC,
        ];

        return $this->render(
            'SuluFormBundle:forms:template.html.twig',
            [
                'types' => $this->getSortedTypes($types),
                'widths' => $widths,
                'receiverTypes' => $receiverTypes,
                'locale' => $request->get('locale', $request->getLocale()),
                'autoTitle' => $this->getParameter('sulu_form.dynamic_auto_title'),
                'fallbackEmails' => [
                    'from' => $this->getParameter('sulu_form.mail.from'),
                    'to' => $this->getParameter('sulu_form.mail.to'),
                ],
            ]
        );
    }
@param Request $request

@return Response