Skip to content

Commit f20a3d2

Browse files
Grégoire Parisweaverryan
authored andcommitted
document the prototype_name option
1 parent a031e32 commit f20a3d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

reference/forms/types/collection.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ forms, which is useful when creating forms that expose one-to-many relationships
1818
| | - `allow_add`_ |
1919
| | - `allow_delete`_ |
2020
| | - `prototype`_ |
21+
| | - `prototype_name`_ |
2122
+-------------+-----------------------------------------------------------------------------+
2223
| Inherited | - `label`_ |
2324
| options | - `error_bubbling`_ |
@@ -313,6 +314,15 @@ rendering your form, having the entire "form row" may be easier for you.
313314
For details on how to actually use this option, see the above example as well
314315
as :ref:`cookbook-form-collections-new-prototype`.
315316

317+
prototype_name
318+
~~~~~~~~~~~~~~
319+
320+
**type**: ``String`` **default**: ``__name__``
321+
322+
If you have several collections in your form, or worse, nested collections
323+
you may want to change the placeholder so that unrelated placeholders are not
324+
replaced with the same value.
325+
316326
Inherited options
317327
-----------------
318328

0 commit comments

Comments
 (0)