Description
I used to have almost exactly same issue as here:
https://stackoverflow.com/questions/21422038/twig-form-theme-self-customizing-individual-field
But worse, my form wasn't in the variable named form
– what resulted in "first rendering" throwing undefined variable exception.
Strange issue, but while it's not exactly Forms component problem, the docs should remind the reader of this Twig behaviour: that when no template is extended, blocks are rendered immediately.
This is what I did that gave me problems:
http://symfony.com/doc/current/cookbook/form/form_customization.html#how-to-customize-an-individual-field
In the more "general" section, the example extends base template, but it is not said, that this is a requirement:
http://symfony.com/doc/current/cookbook/form/form_customization.html#method-1-inside-the-same-template-as-the-form