0

I have a FormWizard that displays three parts of a registration application. The last part involves creating a group and adding members to it. I would like to present two forms at once on the same view.

Group Builder

class GroupBuilder(forms.Form):
    name = forms.CharField(max_length=30,
                       widget=forms.TextInput(attrs={
                       'placeholder': 'eg. The Underdogs'}))

Member Builder

class MemberBuilder(forms.Form):
    first_name = forms.CharField(max_length=128)
    last_name = forms.CharField(max_length=128)
    role = forms.CharField(max_length=128)

How can I present the GroupBuilder Form and a StudentBuilder formset at once?

fidiego
  • 174
  • 3
  • 9
  • 1
    Just pass them in your context? What's the problem you are facing? – Burhan Khalid Jun 06 '14 at 20:35
  • 1
    You're right. I used `WizardViewget_context_data(...):`. Thanks. – fidiego Jun 06 '14 at 22:47
  • @BurhanKhalid, I figured out how to inject the form into the context with `MyWizard.get_context_data(...)`. The issue I'm facing now is that when I submit the forms the data from this form is not submitted. – fidiego Jun 08 '14 at 17:12

0 Answers0