Answer the question
In order to leave comments, you need to log in
Feedback form not working?
Hello.
I do not understand where the cant in the template? I render the form into the variable template {{ form }} and everything works. But if I display the code of the form name="subject" directly in html, it doesn't work, the page is stupidly reloaded and that's it.
here is the code how it works.
<form action="{% url 'contact:contactform' %}" method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="form-group">
</div>
<button type="submit" class="btn btn-warning">Отправить</button>
</form>
<form action="{% url 'contact:contactform' %}" method="post">
{% csrf_token %}
<div class="form-group">
<input id="id_name" type="text" name="name" class="form-control" placeholder="ФИО"/>
</div>
<button type="submit" class="btn btn-warning">Отправить</button>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question