How would one even start to implement something like this with a django form:
CHOICES = (
('a','a',forms.IntegerField()),
('b','b',forms.IntegerField()
)
class AForm(forms.Form):
choice = forms.CharField(choices=CHOICES)
Bit of background: I am trying to convert a ModelMultipleChoiceField
into a custom formField
that displays the model and an additional input per object (that is used to select basically quantity)
So i need to somehow insert a field into the choices tuple (obs that won't work so where would i even start to re-write the ChoiceField to take an extra parameter)
Trying to go through the source of ChoiceField
https://docs.djangoproject.com/en/1.11/ref/forms/fields/#choicefield but I can't work out where I even begin to add the new field (and retrieve it after POST!)