简体   繁体   中英

Clickable Navigation for Django Form Wizard

I've a working form wizard, but I now need a navigation for the various sections/steps of the wizard.

For example, I have something like an application form and there are multiple sections like Personal Details, Academics, etc; each of which is a wizard step. I'm looking for ways to implement a navigation menu for this wizard. Clicking on each of the links should take me to the corresponding step.

This seems like a fairly common usecase, when dealing with larger forms, but no obvious solution.

How can I go about doing this?

I've got a step in a form wizard which shows you the information entered, much like a review screen, where I do this.

This is the markup I use;

<h2>Personal Information
    <span>
        <button name="wizard_goto_step" type="submit"
                value="1">
            (Edit details)
        </button>
    </span>
</h2>

Essentially what you need to do, is send wizard_goto_step to the view, with value defined as whichever step in the wizard you want to go to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM