﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20326	Documentation for form wizard -> get_form()	tris@…	nobody	"The description for this method mentions that 'If no step is defined, the current step will be determined automatically' but the example fails to allow for this.

This is an issue as when validation fails for a step then the method is called with step=None and the custom code will not be executed - in my case I was filtering ModelChoice fields based on the answers to the previous form and was losing my filters.

The example should be:
{{{
def get_form(self, step=None, data=None, files=None):
    form = super(MyWizard, self).get_form(step, data, files)

    if step is None:
        step = self.steps.current

    if step == '1':
        form.user = self.request.user
    return form
}}}
"	Cleanup/optimization	closed	Documentation	1.4	Normal	fixed			Unreviewed	0	0	0	0	0	0
