Reputation: 5237
In a Django ModelForm, you can change the widget type of a field like so:
class EntryForm(ModelForm):
entity = forms.CharField()
class Meta:
model = Entry
I can easily create a modelformset from the same model like so:
EntryFormSet = modelformset_factory(Entry)
But is there a way to include the input field type change change when creating a modelformset?
Upvotes: 5
Views: 2594
Reputation: 11163
modelformset_factory
takes a keyword argument form
, which -- I believe -- will let you pass your form class and have it used...
Upvotes: 4