Skip to content

Commit 8d35519

Browse files
committed
Add getter and setter in the section on basic form options
1 parent cc59a66 commit 8d35519

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

reference/forms/types/form.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ The actual default value of this option depends on other field options:
7676

7777
.. include:: /reference/forms/types/options/form_attr.rst.inc
7878

79+
``getter``
80+
~~~~~~~~~~
81+
82+
**type**: ``callable`` **default**: ``null``
83+
84+
When provided, this callable will be invoked to read the value from
85+
the underlying object that will be used to populate the form field.
86+
87+
More details are available in the section on :doc:`/form/data_mappers`.
88+
7989
.. include:: /reference/forms/types/options/help.rst.inc
8090

8191
.. include:: /reference/forms/types/options/help_attr.rst.inc
@@ -112,6 +122,16 @@ The actual default value of this option depends on other field options:
112122

113123
.. include:: /reference/forms/types/options/required.rst.inc
114124

125+
``setter``
126+
~~~~~~~~~~
127+
128+
**type**: ``callable`` **default**: ``null``
129+
130+
When provided, this callable will be invoked to map the form value
131+
back to the underlying object.
132+
133+
More details are available in the section on :doc:`/form/data_mappers`.
134+
115135
.. include:: /reference/forms/types/options/trim.rst.inc
116136

117137
.. include:: /reference/forms/types/options/validation_groups.rst.inc

0 commit comments

Comments
 (0)