Skip to content

[Form] Document template variables for each form type #1039

Closed
@webmozart

Description

@webmozart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionableClear and specific issues ready for anyone to take them.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions