[Answered ]-Django: How add field to form from model?

2👍

Simply add it 🙂 Like so:

class ProfileForm(forms.ModelForm):
    the_text_field = forms.CharField(required=False, label....)

It is automatically going to be added to form.cleaned_data so you can use it on form.save() or in the view.

👤frnhr

Leave a comment