I\'ve been trying to solve this problem for a couple of days now, getting quite desperate. See the commented out code snippets for some of the things I\'ve tried but didn\'t wor
You don't need any kind of custom forms. You can change the queryset of category field as:
category
IngrFormSet = modelformset_factory(Ingredient, extra=1, fields=('name', 'category')) IngrFormSet.form.base_fields['category'].queryset = Category.objects.filter(user__id=request.user.id)