0

I'm improving my English, be patient

I'm using django-filter and in some part of my HTML I have this structure

{% if viagens.count == 0 %}
<div class="row justify-content-center">
    <h3 class="text-danger">O colocador nao fez nehuma viagem</h3>
</div>
{% else %}
<div class="row">
    <form action="" method="GET">
        {% csrf_token %}
        # here I want a checkbox that automatically submit the form
    </form>
</div>
{% for viagem in viagens %}
    <p>Placeholder</p>
{% endfor %}
{% endif %}

I don't have javascript knowledge, I need this with pure HTML and Django

Bodok
  • 336
  • 2
  • 13

1 Answers1

1

as far as I know you can't without JS.

Check this: submitting a form when a checkbox is checked

With pure HTML, you can use: <input type="submit" value="submit> or <button type="submit>Submit

Don Diego
  • 26
  • 3