File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -950,7 +950,7 @@ the submitted data, those fields will be explicitly set to ``null``.
950
950
Extra fields
951
951
~~~~~~~~~~~~
952
952
953
- All form fields are considered properties of the object but you can inject
953
+ All form fields are considered properties of the object but you can inject
954
954
fields directly into your view without specifying them in the form definition.
955
955
They can be retrieved via the ``getExtraData `` :class: `Symfony\\ Component\\ Form\\ FormTypeInterface `.
956
956
@@ -1000,14 +1000,14 @@ Here, the referral code is an extra field injected at view level.
1000
1000
The field name is composed of form ``user_create `` and the field name ``referralCode ``.
1001
1001
It's automatically generated from the form class name. You can :ref: `override it <changing-the-form-name >`
1002
1002
1003
- Or you can use use
1004
- .. code-block :: html+twig
1003
+ Or you can use use
1004
+
1005
+ .. code-block :: twig
1006
+
1005
1007
{{ form.vars.full_name ~ '[referralCode]' }}
1006
1008
1007
1009
to render the form name dynamically
1008
1010
1009
- {{ form.vars.full_name ~ '[description]' }}
1010
-
1011
1011
You can get the referral code via ``getExtraData ``::
1012
1012
1013
1013
$extraData = $form->getExtraData();
You can’t perform that action at this time.
0 commit comments