Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Thjissen:
Understanding Symfony2 Forms
Sep 14, 2015 @ 09:28:50

Joshua Thjissen has a post on his site that wants to help you understand the basics of Symfony2 forms including how to build them, extend them and the modules they're made up of.

To actually use Symfony2 forms, all you need to do is read some documentation, a few blog posts and you’ll be up and running in a couple of minutes. Understanding Symfony2 forms however, is a whole different ballgame. In order to understand a seemingly simple process of “adding fields to a form”, we must understand a lot of the basic foundation of the Symfony2 Form component. In these blog posts, I’ll try and give some more insights on this foundation.

He starts by explaining the three main steps in the typical form lifecycle: building the form itself, populating and validating data and rendering the form to the waiting user. He then gets into some of the basics of using forms and the types of objects that make them up. He includes examples of creating a simple form, the YAML configuration it compiles to and the functions used to build, render and set options on the form. He finishes up the post looking at form inheritance, extending the form types and where the "ResolvedFormType" comes in to play.

tagged: symfony2 form understand overview types build render validate populate

Link: https://www.adayinthelifeof.nl/2015/09/11/understanding-symfony2-forms/

Eirik Hoem's Blog:
Populate PDF templates with PHP / FPDF / FPDI
May 08, 2008 @ 11:11:55

Eirik Hoem recently pointed out two libraries that can be used in PHP to generate PDF files dynamically - FPDF and FPDI.

Ever wanted to generated PDF documents on the fly with PHP? Perhaps populate a standard contract with a customers name and address? FPDF and FPDI are two neat libraries which greatly helps when working with PDF files.

FPDF handles most of the work of creating and working with the PDF files while FPDI works together with it to pull in existing PDF files so FPDF can modify them. He links to some sample code you can try out once you've installed the two libraries.

tagged: pdf generate fpdf fpdi template populate