Skip to content

Commit

Permalink
Added FormField to wtf macro
Browse files Browse the repository at this point in the history
  • Loading branch information
masell committed Feb 9, 2014
1 parent aeacbec commit a20e98c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions flask_bootstrap/templates/bootstrap/wtf.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@
{% call _hz_form_wrap(horizontal_columns, form_type, True) %}
{{field(class='btn btn-%s' % button_map.get(field.name, 'default'))}}
{% endcall %}
{%- elif field.type == 'FormField' -%}
<fieldset>
<legend>{{ field.name }}</legend>
<div class="control-group">
{%- for subfield in field %}
{% if not bootstrap_is_hidden_field(subfield) -%}
{{ form_field(subfield,
form_type=form_type,
horizontal_columns=horizontal_columns,
button_map=button_map) }}
{%- endif %}
{%- endfor %}
</div>
</fieldset>
{% else -%}
<div class="form-group {% if field.errors %} has-error{% endif %}">
{%- if form_type == "inline" %}
Expand Down

0 comments on commit a20e98c

Please sign in to comment.