So I have my TagStatus model. I\'m trying to make a ModelForm for it. However, my form requires that the hidden input be populated with the {{ tag.name }}. I\'ve been lookin
To make a field in a ModelField a hidden field, use a HiddenInput widget. The ModelForm uses a sensible default widget for all the fields, you just need to override it when the object is constructed.
class TagStatusForm(forms.ModelForm):
class Meta:
model = TagStatus
widgets = {'tag': forms.HiddenInput()}