Closed
Description
The usage of forms in templates should be documented properly. People should understand that each form has attached variables which are accessible via {{ form.vars.<var-name> }}
($form->getVar('<var-name>')
respectively) or, in a form theme, via {{ <var-name> }}
directly ($<var-name>
respectively).
Form children, in contrast, are accessed via {{ form.<child-name> }}
(alternatively {{ form.children.<child-name>
, which is necessary if the child name conflicts with one of the getters in FormView) and via $form['<child-name>']
in PHP templates.
For all form types, the available template variables should be documented (for example, in a "For designers" section) thouroughly.