Search

Friends

Atomspheric CO2 (PPM)

Archives

Blather

Uptime verified by Wormly.com

17 April 2012

Customising repeated field label names in Symfony2

I spent a while trying to customise the FOSUserBundle reset form. It uses a repeated field for the password, which can't really be tweaked from Twig. I finally figured it out using a Twig base form template. It's a little bit crap.

{% block fos_user_resetting_widget %}
  {{ form_row(form.new.first, {'label':'Password'}) }}
  {{ form_row(form.new.second, {'label':'Confirm Password'}) }}
  {{ form_rest(form) }}
{% endblock %}

More info: Symfony2 Twig Form Theming

Comments

No comments yet.

Leave a comment

Markdown

0.090 seconds