Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_form_list is bypassed #168

Closed
nahuelange opened this issue Jun 4, 2020 · 4 comments
Closed

get_form_list is bypassed #168

nahuelange opened this issue Jun 4, 2020 · 4 comments

Comments

@nahuelange
Copy link

Hi,

I'm trying to implement conditionnal steps in my WizardView, using get_form_list to return the needed list of steps.
When I do this, formtools raises an exception trying to access a step in the form_list class attribute.
Line 409 of file formtools/wizard/views.py:

form_class = self.form_list[step] …

Don't the get_form_list method should be called everytime formtools needs the form_list instead of accessing the property?

@nahuelange
Copy link
Author

In my case i must use condition_dict, but the problem about get_form_list still is a question.

@spapas
Copy link

spapas commented Mar 12, 2021

Please could somebody give some love to this issue? You just need to change the the line form_class = self.form_list[step] of the get_form method to form_class = self.get_form_list()[step] to fix it.

It would be really useful to be able to fully configure the list of forms of my wizard. Using the condition_dict is not as powerful as being able to completely redefine the list of the forms.

@martey
Copy link

martey commented May 8, 2021

This looks like a duplicate of #62, which hasn't been merged because it doesn't include automated tests.

@claudep claudep closed this as completed in 533a830 Mar 2, 2022
@violuke
Copy link

violuke commented Oct 19, 2022

This change has caused a lot of people a problem, see #220, can this be reverted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants