Posts Tagged: form

Easiest Way to Customize a Symfony Form

Before I get started, I realize that Symfony has this entire form theming apparatus and it’s great. But this is a simple technique that puts the control of the form in the hands of the person laying out the HTML rather than the developer. All I do is when I’m rendering my form, I wrap… Read more »

Symfony ChoiceType Default to Checkbox Checked

I’m rendering a bunch of checkboxes using a Symfony form type of ChoiceType and I want some of them to be checked by default. It’s basically a list of transactions and the ones that fail will be checked so that the user can fix whatever caused the problem and run them failed ones again. It… Read more »

Symfony Form Variables Reference

Here are the Symfony form variables. I’m posting it here because I find I often need to look at it and it’s easily to find here than in the Symfony documentation. Variable Usage form The current FormView instance. id The id HTML attribute to be rendered. name The name of the field (e.g. title) –… Read more »