Last active
December 18, 2015 03:18
-
-
Save JoshuaEstes/5716798 to your computer and use it in GitHub Desktop.
form.html.twig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set email_class = '' %} | |
{% if form.email.vars.errors %} | |
{% set email_class = 'error' %} | |
{% endif %} | |
{{ form_label(form.email, 'Email', {'label_attr':{'class':email_class}}) }} | |
{{ form_widget(form.email, {'attr':{'class':email_class}}) }} | |
{% if form.email.vars.errors %} | |
{% for error in form.email.vars.errors %} | |
<small class="error">{{ error.message }}</small> | |
{% endfor %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment