From 4516df5c4e461f0a928d3bcd3d4533fe72ff0191 Mon Sep 17 00:00:00 2001 From: Valentin Date: Sat, 8 Dec 2018 12:57:52 +0000 Subject: [PATCH 1/2] Improved compound option description --- .../forms/types/options/compound.rst.inc | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/reference/forms/types/options/compound.rst.inc b/reference/forms/types/options/compound.rst.inc index 10fe4d35a9e..9420e8545a7 100644 --- a/reference/forms/types/options/compound.rst.inc +++ b/reference/forms/types/options/compound.rst.inc @@ -3,22 +3,12 @@ compound **type**: ``boolean`` **default**: ``true`` -If ``true`` this option creates the form as "compound", meaning that it -can contain children and be a parent of other forms. +A compound form can be either an entire ``
`` element or a group of form fields (rendered +for example inside a ``
`` or ```` container elements). Compound forms use the +DataMapperInterface to initialize their children or to write back their submitted data. -Most of the time you won't need to override this option. -You might want to control for it when creating a custom form type -with advanced rendering logic. - -In a view a compound form is rendered as a ``
`` container or -a ```` element (the whole form is obviously a compound form). - -Non-compound forms are always leaves in a form tree, they cannot have children. - -A non-compound form is rendered as one of the html form elements: ```` +A simple (non-compound) form is rendered as any of these HTML elements: ```` (``TextType``, ``FileType``, ``HiddenType``), ``