- Where Developers Learn, Share, & Build Careers


How do I present a form in a controller (not in a template)? I look like something:

  $ form = $ this- & gt; CreateForm (... $ output = $ form-> render);   

$ will be html for the output form.

The form is only an object, it is not known what the layout should be --- this is That's what the template is for. If you are expanding a controller with the default controller, then you can get the HTML of a rendered template like this: $ Html = $ this-> Renderview ('YourAppBundle: Blah: form.html.twig', array ('form' = & gt; createView ()); Form markup / rendering code in that template.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -