Skip to content

Instantly share code, notes, and snippets.

@ajaxray
Created June 18, 2015 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajaxray/3b1f9bdae375b8ff28c2 to your computer and use it in GitHub Desktop.
Save ajaxray/3b1f9bdae375b8ff28c2 to your computer and use it in GitHub Desktop.
Sample Code snippets for my blog post "Symfony2 Forms with Twitter Bootstrap : Rendering a help block" http://wp.me/p2nCeQ-6u
/**
* @Route("/test/form/help", name="test_form_help")
*/
public function sampleFormAction()
{
$form = $this->createFormBuilder()
->add('task', 'text')
->add('dueDate', 'date')
->getForm();
return $this->render('AppBundle:Test:form_help.html.twig', ['form' => $form->createView()]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment