Just for the sake of debugging, if you tweak the field_row directly inside "
/vendor/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/
form.html.twig", does that have an affect? I'm trying to rule out the
possibility that something is caching or somehow some other block is being
used (and not field_row).

Thanks!

Ryan Weaver
Lead Programmer - iostudio - Nashville, TN
http://www.iostudio.com
http://www.thatsquality.com
Twitter: @weaverryan


On Wed, Mar 9, 2011 at 2:06 PM, Josef van Niekerk <
[email protected]> wrote:

> In reference to:
> http://symfony.com/doc/2.0/book/forms/view.html#form-theming-twig-only
>
> I've setup a project that attempts to theme all forms for my
> application, using config.yml, as described in the above mentioned
> page.
>
> I've added a new file to my Symfony2 project, called app/views/
> form.html.twig. I also added
>
> twig:
>  ...
>  form:
>    resources:    [::form.html.twig]
>
> to my config.yml Twig section.
>
> When I override a form field inside my form.html.twig file, it works
> 100% as expected, so the file is being found and loaded successfully.
> However, I want to change the way {% block field_row %} is rendered.
>
> In /vendor/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/
> form.html.twig the field_row template is defined as follows:
>
> {% block field_row %}
> {% spaceless %}
>    <div>
>        {# TODO: would be nice to rename this variable to "field" #}
>        {{ form_label(child) }}
>        {{ form_errors(child) }}
>        {{ form_field(child) }}
>    </div>
> {% endspaceless %}
> {% endblock field_row %}
>
> I copied the above to my form.html.twig file (which I know is loading
> as field overriding works), and I changed the <div> tags to <span>
> tags, and also swapper the form_label and form_errors around. None of
> these changes are overridden, the override for {% block field_row %}
> has no effect.
>
> I already looked around, posted to forums, discussed the issue on IRC
> channel etc, but couldn't find a solution. I expect this is possibly
> an issue.
>
> I apologize for posting here, but dunno where to post possible bugs.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to