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.
1 parent 28d7f89 commit 0762848Copy full SHA for 0762848
cookbook/form/data_transformers.rst
@@ -100,6 +100,14 @@ in your code.
100
:class:`Symfony\\Component\\Form\\DataTransformerInterface` - so you can create
101
your own classes, instead of putting all the logic in the form (see the next section).
102
103
+You can also add the transformer, right when adding the field by changing the format
104
+slightly::
105
+
106
+ $builder->add(
107
+ $builder->create('description', 'textarea')
108
+ ->addModelTransformer(...)
109
+ );
110
111
Harder Example: Transforming an Issue Number into an Issue Entity
112
-----------------------------------------------------------------
113
0 commit comments