I am working on the solution which will enable language selection of my website. My current code is as follows:
{% trans "Select language" %}:
{% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% for lang in LANGUAGES %}
{{ lang.1 }} ({{ lang.0 }})
{% endfor %}
type="submit" value="{% trans 'Change' %}"/>
How do I change it so form is sent without hitting "submit" button? I found that one can use "onchage" attribute, but I cannot implement in within my form