Commit bb520117 authored by Dmitry Medvinsky's avatar Dmitry Medvinsky

Add ability to annotate field with help text

As indicated in WTForms documentation, fields have a description, which is
typically used for help text [1].

Also, in Twitter Bootstrap, help text are supported by `p.help-block` element
[2].

[1] http://wtforms.simplecodes.com/docs/1.0.1/fields.html#wtforms.fields.Field.__init__
[2] http://twitter.github.com/bootstrap/base-css.html#forms
parent baee2375
...@@ -90,6 +90,9 @@ ...@@ -90,6 +90,9 @@
{{ f() }} {{ f() }}
{% endif %} {% endif %}
</div> </div>
{% if f.description %}
<p class="help-block">{{ f.description }}</p>
{% endif %}
{% if f.errors %} {% if f.errors %}
<ul> <ul>
{% for e in f.errors %} {% for e in f.errors %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment