SF2C18 | Mastering Symfony Forms

  • In one day, learn the basics and advanced techniques of handling web forms with the Symfony Form component. You will learn how to create simple form types, extend built-in form types, implement data transformers to normalize data, listen to form events to modify data and form structure, and also create form type extensions to dynamically extend multiple form types in one go.
  • Prerequisites

    Basic knowledge of Symfony
  • Goals

    This one-day workshop helps you to get started with the Symfony Form framework. The first part of the workshop is dedicated to (re)discover the basic concepts such as building form types, dealing with options, processing, validating and rendering forms. The second half of the workshop will then tackle more advanced subjects such as form internals, form data transformers, event listeners and even form type extensions.

Full program

Getting Started with the Form Component

  • Understanding the concept of mapping forms to PHP entity objects
  • Discovering the Symfony built-in form field types
  • Designing custom field types to map form fields to PHP object attributes
  • Handling the submitted data to process the form
  • Prototyping the rendering of a form with Twig
  • Customizing the form rendering with Twig special functions and form themes
  • Attaching validation constraints to trigger validation

Going Further with the Form Component

  • Understanding the internals of the Symfony form framework
  • Overriding the form built-in types
  • Registering custom field types as services
  • Understanding the difference between form field type « static inheritance » and « dynamic inheritance »
  • Registering custom data transformers
  • Registering custom event listeners and event subscribers
  • Designing custom form field type extensions to dynamically enrich any form field types
  • Dealing with nested forms and collections

Time program

Day 1

Appreciation of the training

Global average :

  1. Educational rating : N.C
  2. Content rating : N.C
  3. Pace rating : N.C
  • Duration

    1 hour(s)
  • Level

    Intermediate
  • Available languages

    English
  • Available countries

    France, United States
From €690.00
No session scheduled

No session is scheduled for this course. However we organize tailored training courses: contact us for more informations!