Skip to content

Form: Use Cases and Optimizations

Avatar of Jules Pietri Jules Pietri

Let's take a look at some simple use cases where forms can be so useful but sometimes hard to implement.
With the last PHP7 allowing strict types on object methods, with the Form component refactoring and new features, we will take a moment to share some updated best practices and tricks.

- Using an API with ChoiceType/EntityType: how to optimize data loading?

- Using PHP7: how to handle validation for strict-typed getters/setters?

- Using sensitive data: how to handle permissions and fields visibility?

- Using symfony 2.7 and older: how to rethink some form types while migrating?

- Using multi-steps forms: how to keep control of submitted data?

Delivered in English