Again, the precise mechanics are going to depend upon the view and how that form is being instantiated.
If you’re using an FBV, you can pass it directly. (You’ll also want to pop the value from kwargs
in the __init__
method.)
If you’re using a CBV, you can override get_form
.
See the threads below for some more examples and explanations:
(Not all are directly on point, but do, in general, illustrate the issue. There are more posts along these lines if you wish to search for them.)