Form Types ReferenceEdit this page
Warning: You are browsing the documentation for Symfony 2.8, which is no longer maintained.
Read the updated version of this page for Symfony 6.3 (the current stable version).
To denote the form type, you have to use the fully qualified class name - like
TextType::class in PHP 5.5+ or
Before Symfony 2.8, you could use an alias for each type like
date. The old alias syntax will still work until Symfony 3.0. For more details,
see the 2.8 UPGRADE Log.
A form is composed of fields, each of which are built with the help of
a field type (e.g.
ChoiceType, etc). Symfony comes
standard with a large list of field types that can be used in your application.
The following field types are natively available in Symfony: