Django form Wizard: Create "Add Another Record" button on same form

129 Views Asked by At

I am using django form wizard with 9 steps. My problem is that i need to populate a listview with with multiple records using same form(on step5).

In short on step5 i want my form to have "Add another record" button. When i click this button staying on the same page i populate the table below, usage of this button will be optional. Then i proceed to next steps and complete my process.

my get_form currently looks like this:

def get_form(self, step=None, data=None, files=None):

    # determine the step if not given
    if step is None:
        step = self.steps.current

    return form

what should be my approach?

0

There are 0 best solutions below