{% extends base %} {% macro render_small_field(field) %}
{{field(class_='form-control')}}
{% endmacro %} {% macro small_row(fields) %}
{% for f in fields %} {{ render_small_field(f) }} {% endfor %}
{% endmacro %} {% macro render_radio(field) %}
{% endmacro %} {% macro sized_input(field,size,placeholder) %}
{{field(placeholder=placeholder,class_='form-control')}}
{% endmacro %} {% macro render_form(form) %}
{{ caller() }}
{% endmacro %} {% block body %} {% if form %} {% call render_form(form) %} {{render_radio(form.row_count)}} {% for f in [form.h1,form.h2,form.h3] %} {{ sized_input(f,3,'height') }} {% endfor %} {% set v = '%s ' %} {% set t = ' ' %} {% set rtn = '' %} {% for itm in form.cols %} {% for x in range(5) %} {% set t = v % x %} {% set rtn = rtn + t %} {% endfor %} {% for num in rtn.split(' ') %} {{ small_row(form.cols[num]) }} {% endfor %} {% endfor %} {% endcall %} {% endif %} {% endblock %}