D
D
DmitryRise2017-09-16 15:56:39
JavaScript
DmitryRise, 2017-09-16 15:56:39

Redirect after Django form validation?

There is a form for sending a message (back - Django), validation occurs through html5, how can I make a redirect when the button is clicked exactly after the form is validated?
onclick here, already, will not work

<form action="{% url 'main:send_email' %}" method="post" id="contact-form8">
            <input placeholder="Имя" name="name" minlength="3" required>
            <input placeholder="Номер телефона" name="text" minlength="8" maxlength="18" required>
            <button type="submit">Отправить</button>
            <p class="col-xs-10 col-xs-offset-1">Нажимая на кнопку, <a href="{% static ';/files/data.pdf' %}" target="_blank">вы даете согласие</a> на обработку своих персоональных данных</p>
            <a class="back" href="javascript:PopUpHide10()">Вернуться на сайт</a>
        </form>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question