O'Reilly logo

Symfony2 Essentials by Wojciech Bancer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Forms

Forms handling, processing, and validation are some of the most common things that we do when we create a web application, and practically, the only way we can request data from a website visitor or user. Handling forms effectively was always one of the most requested features in all modern frameworks. In this chapter, we will go deeply into the process of form creation, validation, and saving data.

Form creation

Symfony2 uses the form component to make the creation of forms easier. The form component is a standalone library and can be used independently, but integration with Symfony2 is very good and seamless.

We have two ways to generate forms. The quicker one is to define forms directly within the controller. While this is the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required