Skip to content

Instantly share code, notes, and snippets.

@xtrasmal
Forked from simshaun/config.yml
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xtrasmal/7bd72c81a7aad8a00a29 to your computer and use it in GitHub Desktop.
Save xtrasmal/7bd72c81a7aad8a00a29 to your computer and use it in GitHub Desktop.
Symfony2 form help text
twig:
form:
resources:
- "Form/form_theme.html.twig"
{{ form_row(form.title, {help: 'For reference only.'}) }}
{% extends 'form_div_layout.html.twig' %}
{% block form_row -%}
<div class="form-group {{ container_class|default(false) }}">
{{ form_label(form) }}
{{ form_errors(form) }}
{{ form_widget(form) }}
{% if help|default(false) %}
<div class="help-block">{{ help }}</div>
{% endif %}
</div>
{%- endblock form_row %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment