From b76b19903552db25fc8adb4c6ade4078f9b8d268 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Wed, 12 Mar 2025 10:47:41 +0100 Subject: [PATCH] [TwigBridge] Add Twig field_id() form helper --- form/form_customization.rst | 6 ++++++ reference/twig_reference.rst | 1 + 2 files changed, 7 insertions(+) diff --git a/form/form_customization.rst b/form/form_customization.rst index 1c23601a883..dc09aefe77d 100644 --- a/form/form_customization.rst +++ b/form/form_customization.rst @@ -103,6 +103,7 @@ That's why Symfony provides other Twig form helpers that render the value of each form field part without adding any HTML around it: * ``field_name()`` +* ``field_id()`` * ``field_value()`` * ``field_label()`` * ``field_help()`` @@ -116,6 +117,7 @@ fields, so you no longer have to deal with form themes: +.. versionadded:: 7.3 + + The ``field_id()`` helper was introduced in Symfony 7.3. + Form Rendering Variables ------------------------ diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index acbab2f3817..bb636c69f02 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -408,6 +408,7 @@ explained in the article about :doc:`customizing form rendering ` * :ref:`form_rest() ` * :ref:`field_name() ` +* :ref:`field_id() ` * :ref:`field_value() ` * :ref:`field_label() ` * :ref:`field_help() `