One of the most common tasks developers have to do over and over is form handling. Luckily, Symfony handles this with a Form component so robust that it can live outside Symfony and be incorporated into other frameworks. Take a look into the Form component to handle data rendering and submission.
- [Narrator] Using forms is one of the fundamental tools…of any framework.…It's the front door of interaction…with the end user of any application.…We could use PHP's internal request or post arrays.…However, frameworks make this interaction much simpler,…and Symfony is not the exception.…So let's see how we can interact…with a form in Symfony…and leave the road prepared to use real data.…So let's fix a small detail…so we can use a form for editing and for adding.…
So let's add the route to this button,…Let's go to the view, client's index,…and let's change this to path,…and let's get the name of the route from the controller,…which will be new client.…Go back.…Paste and save.…Let's refresh.…Just click.…And we get this error…because we have not loaded the titles to the view.…So let's do that.…Let's do exactly this, titles,…and we may also want to copy the form,…the empty form,…and let's just add an index for the title,…which will be empty if we don't.…
Just a string and destring and there we go.…Refresh.…And there we have it.…
- Installing Symfony
- Setting up the local environment
- Exploring the Symfony file structure
- Creating routes
- Sending parameters to a controller
- Using views
- Updating routes
- Creating templates with Twig
- Data modeling with Symfony
- Demo application deployment
Skill Level Intermediate
PHP: Clean URLs on Apache Serverwith David Powers1h 36m Intermediate
PHP: Managing Persistent Sessionswith David Powers2h 41m Intermediate
1. Get Started with Symfony
Install Symfony1m 33s
2. Controllers in Symfony
3. Views in Symfony
4. Data Modeling with Symfony
5. Taking Symfony Further
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.