{% if application_field.field_type in 'CharField,TextField,StatusField' %}
    {% if action == 'isnull' %}
        <select class="form-select form-select-sm" name="{{ application_field.field }}__isnull">
            <option value="false">Yes</option>
            <option value="true">No</option>
        </select>
    {% else %}
        <input type="text" class="form-control form-control-sm" name="{{ application_field.field }}__{{ action }}" id="inputValue">
    {% endif %}
{% elif application_field.field_type in 'DateField' %}
        {% if action in 'day,month,year,week' %}
            <input type="number" class="form-control form-control-sm" name="{{ application_field.field }}__{{ action }}" id="inputValue">
        {% else %}
            <input type="date" class="form-control form-control-sm" name="{{ application_field.field }}__{{ action }}" id="inputValue">
        {% endif %}
{% elif application_field.field_type == 'DateTimeField' %}
        {% if action in 'day,month,year' %}
            <input type="number" class="form-control form-control-sm" name="{{ application_field.field }}__{{ action }}" id="inputValue">
        {% else %}
            <input type="datetime-local" class="form-control form-control-sm" name="{{ application_field.field }}__{{ action }}" id="inputValue">
        {% endif %}
{% elif application_field.field_type in 'DecimalField,BigAutoField,IntegerField,PositiveSmallIntegerField,PositiveIntegerField,AutoField,FloatField' %}
    <input type="number" class="form-control form-control-sm" name="{{ application_field.field }}__{{ action }}" id="inputValue">

{% elif application_field.field_type == 'BooleanField' %} 
    <select class="form-select form-select-sm" name="{{ application_field.field }}__{{ action }}">
        <option>True</option>
        <option>False</option>
    </select>
{% elif application_field.field_type in 'ForeignKey,ManyToManyField' %}
    {% if action == 'advanced' %}
        <select
            class="form-select form-select-sm"
            name="field_name"
            hx-get="{% url "components_object_model_form" %}?content_type_id={{ application_field.related_model.pk }}&form_prefix={{application_field.field}}__"
            hx-trigger="change"
            hx-target="#advancedFilterInputField"
        >
            <option selected disabled>Select field</option>
            {% for field in related_application_fields %}
                <option value="{{ field.field }}">{{ field.field }}</option>
            {% endfor %}
        </select>

        <div id="advancedFilterInputField">

        </div>
    {% else %}
        {{ form }}
    {% endif %}    
{% endif %}

