50% discount in conference replays
2020 and 2021 events
In English, French, German, Polish and Spanish

Form Types Reference

Edit 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.0 (the current stable version).

Form Types Reference


To denote the form type, you have to use the fully qualified class name - like TextType::class in PHP 5.5+ or Symfony\Component\Form\Extension\Core\Type\TextType. Before Symfony 2.8, you could use an alias for each type like text or 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. TextType, ChoiceType, etc). Symfony comes standard with a large list of field types that can be used in your application.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.