diff --git a/cookbook/form/create_custom_field_type.rst b/cookbook/form/create_custom_field_type.rst
index 2c0ba955003..3cb5f33c265 100644
--- a/cookbook/form/create_custom_field_type.rst
+++ b/cookbook/form/create_custom_field_type.rst
@@ -129,7 +129,7 @@ link for details), create a ``gender_widget`` block to handle this:
.. code-block:: html+php
-
+
block($form, 'widget_container_attributes') ?>>
@@ -151,6 +151,8 @@ link for details), create a ``gender_widget`` block to handle this:
Further, the main config file should point to the custom form template
so that it's used when rendering all forms.
+ When using Twig this is:
+
.. configuration-block::
.. code-block:: yaml
@@ -181,6 +183,51 @@ link for details), create a ``gender_widget`` block to handle this:
),
));
+ For the PHP templating engine, your configuration should look like this:
+
+ .. configuration-block::
+
+ .. code-block:: yaml
+
+ # app/config/config.yml
+ framework:
+ templating:
+ form:
+ resources:
+ - 'AcmeDemoBundle:Form'
+
+ .. code-block:: xml
+
+
+
+
+
+
+
+
+ AcmeDemoBundle:Form
+
+
+
+
+
+ .. code-block:: php
+
+ // app/config/config.php
+ $container->loadFromExtension('framework', array(
+ 'templating' => array(
+ 'form' => array(
+ 'resources' => array(
+ 'AcmeDemoBundle:Form',
+ ),
+ ),
+ ),
+ ));
+
Using the Field Type
--------------------