Skip to content

Commit d45e1f3

Browse files
committed
csrf and property_path option added
1 parent 73c51cf commit d45e1f3

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

reference/forms/types/csrf.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ The ``csrf`` type is a hidden input field containing a CSRF token.
1111
+-------------+--------------------------------------------------------------------+
1212
| Options | - ``csrf_provider`` |
1313
| | - ``page_id`` |
14-
| | - ``error_bubbling`` |
14+
| | - ``property_path`` |
15+
+-------------+--------------------------------------------------------------------+
16+
| Inherited | - ``error_bubbling`` |
17+
| options | |
1518
+-------------+--------------------------------------------------------------------+
1619
| Parent type | ``hidden`` |
1720
+-------------+--------------------------------------------------------------------+
@@ -28,6 +31,13 @@ Options
2831
* ``page_id`` [type: string]
2932
An optional page identifier used to generate the CSRF token.
3033

34+
.. include:: /reference/forms/types/options/property_path.rst.inc
35+
36+
Inherited options
37+
-----------------
38+
39+
These options are inherited from the parent ``fieldType`` class.
40+
3141
* ``error_bubbling`` [type: Boolean, default: true]
3242
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
3343
:start-line: 1

reference/forms/types/options/preferred_choices.rst.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
* ``preferred_choices`` [type: array]
23
If this option is specified, then a sub-set of the total number of options
34
will be moved to the top of the select menu. The following would move
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* ``property_path`` [type: any, default: the field's value]
2+
Fields display a property value of the form's domain object by default. When
3+
the form is submitted, the submitted value is written back into the object.
4+
5+
If you want to override the property that a field reads from and writes to,
6+
you can set the ``property_path`` option. Its default value is the field's
7+
name.

0 commit comments

Comments
 (0)