2
It’s not any different if you’re using a generic view. You just need to override the correct method: in this case, get_form_kwargs
would be a good bet, as this returns the keyword arguments to pass to the form instantiation. So in that method you just need to add your extra parameter to whatever is returned by the superclass method.
Source:stackexchange.com