We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a2e9654 + 4593baf commit 03c6796Copy full SHA for 03c6796
cookbook/bundles/override.rst
@@ -99,7 +99,19 @@ In progress...
99
Forms
100
-----
101
102
-In progress...
+In order to override a form type, it has to be registered as a service (meaning
103
+it is tagged as "form.type"). You can then override it as you would override any
104
+service as explained in "Services & Configuration". This, of course, will only
105
+work if the type is referred to by its alias rather than being instantiated,
106
+e.g.:
107
+
108
+.. code-block:: php
109
+ $builder->add('name', 'custom_type');
110
111
+rather than
112
113
114
+ $builder->add('name', new CustomType());
115
116
Validation metadata
117
-------------------
0 commit comments