{% set inputType = "date" if field.field_type == FieldType.DATE else "number" if field.field_type == FieldType.NUMBER else "text" %}

      <div>
        <label for="{{ field.alias }}" class="block font-medium mb-2">{{ field.name }}</label>
        {% if field.is_list %}
          <div id="{{ field.alias }}_inputs" class="sortable-list">

            {% for item in (content.data.get(field.alias) if content and field.is_list and content.data.get(field.alias) else [None]) %}
              <div class="sortable-item mb-2 flex items-center gap-2">
                <span class="cursor-grab material-icons">drag_handle</span>
                <input
                  type="{{ inputType }}"
                  name="{{ field.alias }}"
                  value="{{ item or '' }}"
                  class="input input-bordered w-full max-w-xs"
                  {% if field.is_required %}required{% endif %}
                >
                {% if loop.index > 1 %}
                  <button class="btn" onclick=removeField(this)>Remove</button>
                {% endif %}
              </div>
            {% endfor %}
          </div>
          <button type="button" onclick="addInput('{{ field.alias }}_inputs')" class="btn btn-neutral mt-2">Add more</button>
        {% else %}
          <input
            type="{{ inputType }}"
            id="{{ field.alias }}"
            name="{{ field.alias }}"
            value="{{ content.data.get(field.alias) if content and content.data.get(field.alias) else '' }}"
            class="input input-bordered w-full max-w-xs"
            {% if field.is_required %}required{% endif %}
          >
        {% endif %}
      </div>    