symfony/symfony-docs — Issue #1039: [Form] Document template variables for each form type
Author: bschussek
Created: 2012-01-30 09:21:34+00:00
State: open

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. }}` (`$form->getVar('')` respectively) or, in a form theme, via `{{ }}` directly (`$` respectively).

Form children, in contrast, are accessed via `{{ form. }}` (alternatively `{{ form.children.`, which is necessary if the child name conflicts with one of the getters in FormView) and via `$form['']` in PHP templates.

For all form types, the available template variables should be documented (for example, in a "For designers" section) thouroughly.