I have a regular form with the basic template:
<form method="post" action="">
{% csrf_token %}
{{ form }}
<input type="submit" value="submit">
</form>
The form consists of three integer fields defined in forms.py
class InitForm(forms.Form):
row_1 = forms.IntegerField(initial=1, min_value=1)
row_2 = forms.IntegerField(initial=1, min_value=1)
row_3 = forms.IntegerField(initial=1, min_value=1)
The maximum value is set at runtime using input from the user. I have added it to the context by using
get_context_data()...
in the form view class, but how do I set the maximum input value for the three integer fields in the template? I can already output the maximum value in the template by
{{ maximum_value }}
I am just having trouble adding it to the form fields. For reference I need the maximum value on all the fields