-
Notifications
You must be signed in to change notification settings - Fork 53
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
How can use form_class with extra fields #43
Comments
Hi @flaudizio, Are you talking about MultiForm? You can use an a FormSet inside of a MultiForm. There is an example of using an inline formset inside of a MultiForm in the tests: https://github.com/fusionbox/django-betterforms/blob/master/tests/forms.py#L129-L146 Is that what you were thinking? |
Hi, thank's a lot. One else thing, when I save in view I get this error: can't set attribute multiform.py in is_valid:
...
My forms.py class ContactForm(ModelForm): class PhoneForm(ModelForm): PhoneInlineFormSet = inlineformset_factory(Contact, Phone, class ContactPhoneForm(MultiModelForm):
In my views.py class ContactCreate(CreateView):
Once again, very thank you. Atenciosamente, On Tue, Aug 2, 2016 at 11:16 AM, Rocky Meza notifications@github.com
|
Hi, can you show the example using inline ? I just haven't this (in view): AttributeError contato = form['contato'].save() Thank's and sorry for work. |
Hi,
with betterforms can possible to use form_classes with more one field (like extra from inlineformset_factory) ?
Thank's a lot.
The text was updated successfully, but these errors were encountered: