{% macro value_for(name) %} {%- if name in values -%} {{- values | get(key=name) | first -}} {%- endif -%} {% endmacro value_for %} {% macro errors_for(name) %} {%- if name in errors -%} {% set field_errors = errors | get(key=name) %} {% for error in field_errors %}
{{ error.msg }}
{% endfor %} {%- endif -%} {% endmacro errors_for %} {% macro input(type, label, name, value="") %} {{ self::errors_for(name=name) }} {% endmacro input %} {% macro checkbox(name, label, value="yes") %} {% endmacro checkbox %} {% macro textarea(label, name, placeholder="", max=250) %} {{ self::errors_for(name=name) }} {% endmacro textarea %} {% macro select(label, name, options) %} {% endmacro select %}