@@ -3,22 +3,14 @@ compound
3
3
4
4
**type**: ``boolean`` **default**: ``true``
5
5
6
- If ``true`` this option creates the form as "compound", meaning that it
7
- can contain children and be a parent of other forms.
6
+ A compound form can be either an entire ``< form > `` element or a group of form fields (rendered
7
+ for example inside a ``< div > `` or ``< tr > `` container elements). Compound forms use the
8
+ DataMapperInterface to initialize their children or to write back their submitted data.
8
9
9
- Most of the time you won't need to override this option.
10
- You might want to control for it when creating a custom form type
11
- with advanced rendering logic.
12
-
13
- In a view a compound form is rendered as a ``< div > `` container or
14
- a ``< form > `` element (the whole form is obviously a compound form).
15
-
16
- Non-compound forms are always leaves in a form tree, they cannot have children.
17
-
18
- A non-compound form is rendered as one of the html form elements: ``< input > ``
10
+ A simple (non-compound) form is rendered as any of these HTML elements: ``< input > ``
19
11
(``TextType``, ``FileType``, ``HiddenType``), ``< textarea > `` (``TextareaType``)
20
12
or ``< select > `` (``ChoiceType``).
21
13
22
- An interesting case is the ``ChoiceType``. With ``expanded=false`` it is a non- compound form
23
- and is rendered as a `` < select > `` tag. With ``expanded=true`` the ``ChoiceType`` becomes a
24
- compound form and is rendered as a set of radios or checkboxes .
14
+ Some core types like date related types or the ``ChoiceType`` are simple or compound depending
15
+ on other options (such as ``expanded `` or ``widget``). They will either behave as a simple text
16
+ field or as a group of text or choice fields .
0 commit comments