Skip to content

Commit f36e674

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Mention a possible way of reusing the same form
2 parents 242bb2a + 3da2c1c commit f36e674

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

forms.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,16 @@ possible paths:
449449
data is passed to it, you can
450450
:doc:`use the submit() method to handle form submissions </form/direct_submit>`.
451451

452+
.. tip::
453+
454+
If you need to render and process the same form in different templates,
455+
use the ``render()`` function to :ref:`embed the controller <templates-embed-controllers>`
456+
that processes the form:
457+
458+
.. code-block:: twig
459+
460+
{{ render(controller('App\\Controller\\TaskController::new')) }}
461+
452462
.. _validating-forms:
453463

454464
Validating Forms

0 commit comments

Comments
 (0)