Skip to content

Form reset does not work for NamedUrlWizardView #202

Open
@danielsjf

Description

@danielsjf

From the source code I understand that it is possible to reset formtools via
See:

if 'reset' in self.request.GET:

This would work for urls like https://[...]formtools-url?reset

Unfortunately this doesn't work for named wizards since the step_url is not None. Setting it to None typically does not work with the url parameters https://[...]formtools-url/<step>/

I think adding the following code could solve this.

elif step_url == 'reset':
    self.storage.reset()
    self.storage.current_step = self.steps.first

After which urls like https://[...]formtools-url/reset/ could reset the form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions