'Django Model Form Integer as Drop Down
I have a simple Model form in my project as follows:
class InviteForm(forms.ModelForm):
class Meta:
model = Invite
fields = ['max_guests', 'rsvp_guests', 'rsvp_attendance']
Max Guests is just an integer and appears for the user to type in. As the value is always small (<10), I would like this to be a dropdown instead with all values 0-max.
Is there a way to overwrite an integer input as such?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
