{% macro select(field, hint=None, disable=[], option_hints={}, hide_legend=False, collapsible_opts={}, legend_style="text", input="radio", inline=False) %} {% call select_wrapper( field, hint, disable, option_hints, hide_legend, collapsible_opts, legend_style, inline=inline ) %} {% for option in field %} {{ select_input(option, disable, option_hints, input=input) }} {% endfor %} {% endcall %} {% endmacro %} {% macro select_list(options, child_map, disable=[], option_hints={}, input="radio") %} {% endmacro %} {% macro select_nested(field, child_map, hint=None, disable=[], option_hints={}, hide_legend=False, collapsible_opts={}, legend_style="text", input="radio") %} {% call select_wrapper( field, hint, disable, option_hints, hide_legend, collapsible_opts, legend_style ) %}
{{ select_list(child_map[None], child_map, disable, option_hints, input=input) }}
{% endcall %} {% endmacro %} {% macro select_wrapper(field, hint=None, disable=[], option_hints={}, hide_legend=False, collapsible_opts={}, legend_style="text", inline=False) %} {% set is_collapsible = collapsible_opts|length %}
{% if is_collapsible %}
{% endif %}
{% if hide_legend %}{% endif %} {{ field.label.text|safe }} {% if hide_legend %}{% endif %} {% if hint %} {{ hint }} {% endif %} {% if field.errors %} {{ field.errors[0] }} {% endif %} {{ caller() }}
{% endmacro %} {% macro select_input(option, disable=[], option_hints={}, data_target=None, as_list_item=False, input="radio") %} {% if as_list_item %}
  • {% else %}
    {% endif %} {% if caller %} {{ caller() }} {% endif %} {% if as_list_item %}
  • {% else %} {% endif %} {% endmacro %}