{# macros to create form fields #}
{% macro field(type, name, label="", value=none, class='', help="", required=false, icon_left=none, icon_right=none, attrs=none) %}
{# 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 %}
{% if icon_left %}
{# we use with font from CSS instead of SVG, because using directly SVG doesn't play way with Bulma's control #}
{% endif %}
{% if icon_right %}
{% endif %}
{% if help %}
{{help}}
{% endif %}
{% endmacro %}
{% macro select(name, options_list, selected=none, required=false, multiple=false) %}
{# selection of elements with
{% for value, label in options_list %}
{% endfor %}
{% endmacro %}
{% macro choices(name, choices_list, checked=none) %}
{% for choice, label in choices_list %}
{% endfor %}