{% macro add_field_input(field) -%} {% if field.type == 'option' %} {{ add_option_field(field) }} {% else %} {% if field.type == "checkbox" and field.checked %} {# Hack to work with flags that are default on. As checkbox is only sent down when checked we duplicate hidden field that is always sent but with empty value. https://stackoverflow.com/a/1992745/1306577 #} {% endif %} {% endif %} {%- endmacro %} {% macro add_option_field(field) -%} {%- endmacro %} {% macro add_variadic_field_input(field) -%} {% if field.type == 'option' or field.type == "checkbox" %} VARIARDIC OPTIONS OR CHECKBOXES ARE NOT SUPPORTED {% else %} {% endif %}
(Each line will be passed as separate argument) {{ field.desc|default('', true)|capitalize }}
{%- endmacro %}