<div class="layui-form-item{% if field.is_hidden %} layui-hidden {% endif %}{% if field.name %} field-{{ field.name }}{% endif %}">
    {% if field.is_checkbox %}
        {{ field }}{{ field.label_tag }}
    {% else %}
        <label class="layui-form-label" for="{{ field.id_for_label }}">{{ field.label }}{% if field.field.required %}<span class="required">*</span>{% endif %}</label>
        <div class="layui-input-inline {% if field.is_hidden %} layui-hidden {% endif %}">
            {% if field.is_readonly %}
                <div class="readonly">{{ field.contents }}</div>
            {% else %}
                {{ field }}
            {% endif %}
        </div>
    {% endif %}
    {% if field.help_text %}
        <div class="layui-form-mid layui-word-aux">{{ field.field.help_text|safe }}</div>
    {% endif %}
</div>