{% comment %}
Render a form field instance as field (to be used when no model instance is provided). Value is binded as vue, class to Bulma

Context:
- name: field name
- field: form field
- value: input ":value" attribute
- vbind: if True, use ":value" instead of "value"
- hidden: if True, hidden field
{% endcomment %}
{% load aircox %}

{% if field.widget.is_hidden or hidden %}
<input type="hidden" name="{{ name }}" value="{{ value|default:"" }}">
{% elif field|is_checkbox %}
<input type="checkbox" class="checkbox" name="{{ name }}" {% if value %}checked{% endif %}>
{% elif field|is_select %}
<select name="{{ name }}" class="select" value="{{ value|default:"" }}">
    {% for value, label in field.widget.choices %}
    <option value="{{ value }}">{{ label }}</option>
    {% endfor %}
</select>
{% else %}
<input type="text" class="input" name="{{ name }}" value="{{ value|default:"" }}">
{% endif %}
