{% load daisyui_field %}

{% if field.is_hidden %}
  {{ field }}
{% else %}
  <div id="div_{{ field.auto_id }}" class="{% if wrapper_class %}{{ wrapper_class }} {% endif %}{% if field_class %}{{ field_class }}{% else %}mb-3{% endif %}">

    {% if field.label and form_show_labels %}
      <label for="{{ field.id_for_label }}" class="{% if label_class %}{{ label_class }}{% endif %}">
        {{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
      </label>
    {% endif %}

    <div class="join w-full">
      {% if crispy_prepended_text %}
        <span class="join-item flex items-center px-3 bg-base-200">{{ crispy_prepended_text|safe }}</span>
      {% endif %}

      {% daisyui_field field "class" "input join-item w-full" %}

      {% if crispy_appended_text %}
        <span class="join-item flex items-center px-3 bg-base-200">{{ crispy_appended_text|safe }}</span>
      {% endif %}
    </div>

    {% include 'daisyui/layout/field_errors.html' %}
    {% include 'daisyui/layout/help_text.html' %}
  </div>
{% endif %}
