0

How can you pre-define one of the fields in a ModelForm?

When creating a ModelForm, you can choose which fields to display in your browser. Though, I would like to preset one of them.

thanks to all !

TMD
  • 191
  • 1
  • 2
  • 14
  • This is described in the documentation of ModelForm [here](https://docs.djangoproject.com/en/2.1/topics/forms/modelforms/#providing-initial-values). – dirkgroten Mar 10 '19 at 14:39
  • Possible duplicate of [How to give initial value in modelform](https://stackoverflow.com/questions/1054546/how-to-give-initial-value-in-modelform) – dirkgroten Mar 10 '19 at 14:40

0 Answers0