{# Less ambiguous to work with than a checkbox. However, displays a checkbox #} {# if the third parameter is truthy #} {%- macro formBoolean(name, label, checkbox) -%} {% if checkbox %}
{% else %} {{ formSelect(name, label, [ { value: '1', label: 'Yes' }, { value: '0', label: 'No' }]) }} {% endif %} {%- endmacro -%}