[3/4] Symfony 3 Contact Form - Beginner Friendly Symfony 3

8K views Feb 14, 2023

Towards the end of the previous video we had set up a new Symfony project, added the Bootstrap stylesheet, and looked into our first Controller action and its associated Twig template. In this video we will make a start on adding our Support / Contact Form. The idea behind this form is simple enough. We will have two `input` fields, one for an email address, and another for the message that the end users wishes to send us. Hopefully it won't just contain profanity. We're going to start by keeping things as simple as possible. Now, simple and Symfony's Form Component are not two things I would generally put together. In truth, Symfony's Form Component is complex. With that complexity comes a lot of power, but initially, it can be confusing. Part of this confusion comes from the fact that we can achieve the same outcome in multiple different ways. In this video we are going to create a form by using the `FormBuilder`. The form builder allows us to create objects (think: Object Oriented Programming objects) that represent the form we wish to display. One of the strangest parts about Symfony's forms are that when we create a form, it's not a HTML form in the sense that you may typically have worked with before. Instead, forms are a collection of objects that can be translated into HTML forms. But they need not be displayed as HTML forms at all. You can use the form component without ever rendering any HTML. Strange, eh? See the full series at CodeReviewVideos.com

#Email & Messaging
#Service Providers
#Web Services