Opened 5 years ago

Closed 4 years ago

#18000 closed New feature (fixed)

Add Save and Goto Step to Form Wizard

Reported by: creecode Owned by: steph
Component: contrib.formtools Version: 1.4
Severity: Normal Keywords: form wizard save goto step
Cc: steph, Melvyn Sopacua Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've been working with the new form wizard in 1.4 and I discovered that apparently the goto form step feature was designed to not store data from the current step before going to the step specified.

This seems like a situation that will easily lead to confusion and frustration. I suggest that in addition to the current cancel and goto step feature a save and goto step feature is needed.

I created a patch that changes the behavior of wizard_goto_step into a save and goto, which seems safer to me, and then adds a wizard_cancel_step_goto.

Please feel free to tinker with the code. I'm happy as long a I get a little more control over how data is handled when going to another step.

Toodle-looooooooooo..........

creecode

Attachments (1)

wizard_save_goto_step.diff (2.8 KB) - added by creecode 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by creecode

Attachment: wizard_save_goto_step.diff added

comment:1 Changed 5 years ago by Jannis Leidel

Cc: steph added

comment:2 Changed 4 years ago by Melvyn Sopacua

Cc: Melvyn Sopacua added
Triage Stage: UnreviewedDesign decision needed

Needs a decision on whether it's useful. A +1 from me, for what it's worth ;)

comment:3 Changed 4 years ago by steph

I just wrote a bunch of code to make it possible to store the form data before changing the step. I don't think we should change the default behaviour because users except that the data is not saved. With this change any developer can overwrite the render_goto_step method to change the default behaviour. Please see this commit: https://github.com/stephrdev/django/commit/1b7e25e0427888af7958f3960c31f42ff1ce3ef2

comment:4 Changed 4 years ago by steph

Owner: changed from nobody to steph
Status: newassigned

comment:5 Changed 4 years ago by Jannis Leidel

Triage Stage: Design decision neededReady for checkin

comment:6 Changed 4 years ago by Jannis Leidel <jannis@…>

Resolution: fixed
Status: assignedclosed

In e7514e4978178ba68a872ac0004dd6f8049f3d76:

Merge pull request #942 from stephrdev/trac-18000

Fixed #18000 -- Moved the code to handle goto requests to an extra WizardView method.

Note: See TracTickets for help on using tickets.
Back to Top