Is there some way to make the following possible, or should it be done elsewhere?
class JobRecordForm(forms.ModelForm): supervisor = forms.ModelChoiceField( queryset = User.objects.filter(groups__name='Supervisors'), widget = forms.RadioSelect, initial = request.user # is there some way to make this possible? ) class Meta: model = JobRecord
You might want to handle this in your view function. Since your view function must create the initial form, and your view function knows the user.
This will trigger validation of this input, BTW, so you can’t provide hint values this way.