One Symfony Form, Two Views: Read-Only Summaries Without Duplication

php dev.to

A form often has a second life. First, someone uses it to enter or update information. Then, somewhere else in the application, someone needs to read that same information: on a confirmation screen, an internal detail page, or a review step before submitting a request. The editable form is already there. Yet the read-only version frequently becomes another Twig template, with another list of fields, another set of labels, and sometimes another set of rules for displaying their values. This is

Read Full Tutorial open_in_new
arrow_back Back to Tutorials