Skip to content

Commit

Permalink
Merge branch '5.4' into 6.3
Browse files Browse the repository at this point in the history
* 5.4:
  Fix custom form type docs.
  • Loading branch information
OskarStark committed Dec 9, 2023
2 parents 4beb87e + bb30765 commit 8ca8c9b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions form/create_custom_field_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,8 @@ fragments used to render the types:
{# ... here you will add the Twig code ... #}
Then, update the :ref:`form_themes option <reference-twig-tag-form-theme>` to
add this new template at the beginning of the list (the first one overrides the
rest of files):
Then, update the :ref:`form_themes option <config-twig-form-themes>` to
add this new template at the end of the list (each theme overrides all the previous ones):

.. configuration-block::

Expand All @@ -374,8 +373,8 @@ rest of files):
# config/packages/twig.yaml
twig:
form_themes:
- 'form/custom_types.html.twig'
- '...'
- 'form/custom_types.html.twig'
.. code-block:: xml
Expand All @@ -390,8 +389,8 @@ rest of files):
https://symfony.com/schema/dic/twig/twig-1.0.xsd">
<twig:config>
<twig:form-theme>form/custom_types.html.twig</twig:form-theme>
<twig:form-theme>...</twig:form-theme>
<twig:form-theme>form/custom_types.html.twig</twig:form-theme>
</twig:config>
</container>
Expand All @@ -402,8 +401,8 @@ rest of files):
return static function (TwigConfig $twig): void {
$twig->formThemes([
'form/custom_types.html.twig',
'...',
'form/custom_types.html.twig',
]);
};
Expand Down

0 comments on commit 8ca8c9b

Please sign in to comment.