{# macros to create form fields #} {% macro field(type, name, label="", required=false) %} {# generic field "class" keyword can be used to add classes additional kwargs will be passed as attributes #} {% set cur_id = name|next_gidx %} {% if label %} {% endif %} {% endmacro %} {% macro choices(name, choices_list, checked=none) %} {% for choice, label in choices_list %}