#StackBounty: #html #django #forms Link an `a` tag with `href` in a django form HTML

Bounty: 50

I have a django form and I am trying to create a step up form where when you finish one section you click next to the go the next section in the same HTML template:

I have created everything fine but I am stuck with the button for the next button. I have set an id and linked it to an href but is not opening the next form as required.

Here is what I have tried to make it easier for explaining:

          <ul class="nav nav-pills mb-3" id="ex-3" role="tablist">
            <!-- General Information -->
            <li class="nav-item" role="presentation">
              <a class="nav-link active" id="ex-3-tab-1" data-mdb-toggle="pill"
                href="#generalInformation"
                role="tab" aria-controls="pills-1" aria-selected="true"
                >General Information</a>
            </li>
            <!-- Contact Information -->
            <li class="nav-item" role="presentation">
              <a
                class="nav-link"
                id="tab_contactInformation"
                data-mdb-toggle="pill"
                href="#contactInformation"
                role="tab" aria-controls="pills-2" aria-selected="false"
                >Contact Information</a
              >
            </li>
        </ul>

In the General info part I have added an a tag to link to href="#contactInformation" same as the nav-pill showing in the top but it is not leading to it. It is just saying in the same location.

                    <a
                      href="#contactInformation"
                      >Contact Information</a
                    >

My question

How to add an a tag with href linking to the next part? What am I doing wrong and how can I fix it?
Thanks for the explanation in advance to understand.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.