Yep, forms! One of the most powerful and... confusing features in all of Symfony. Here's the truth: forms are just plain hard. You need to manage the HTML form elements, validation, data transformation and a lot more. The Form component might be the most complex part of Symfony. But the more you work with it, the more you'll like it.
So, let's work with some forms! We'll learn how to use Symfony forms to handle both simple & complex/ugly situations. Most importantly, I'll show you how to avoid the pitalls that many developers often fall into that causes the form component to spiral into complexity hell. The form system is a tool: in this tutorial, we'll put the joy back into it:
- Creating a basic form
- Basic form rendering and customization
- Handling a form submit
- Backing your form with an entity
- Adding validation
- Filling with default data
- Creating a form "type" class
- Understanding how forms really work
- Flash messages
... and bad jokes + form tips & tricks!