'can I go to a new section after submitting a form in Django
My template is composed by section and div tags, and
I want to know is there a way make me go to a new section
<section> </section>
on the same template-page only when my form is submitted , if yes, how i can force that on html template what i should put as a condition before the section tag because i want in the same way display error message and go to the first page if the form is not submitted!!.
----i have tried to do that by the submitting button where i have set the "id" tag of the next section where should go after the submitting button but it just goes to First page not to the specific id section that i have set it on the button tag.-----
<button onclick="location.href='#registration'">Submit</button>
THANKS IN ADVANCE.
Solution 1:[1]
Try this
<a href="#registration"><button>submit</button></a>
You may have to add a few things to make it work exactly like you want.
However note that this is not a django question, rather an html question.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | RandomMadi |
