class StudentRegistrationForm(forms.Form):
end_year = forms.IntegerField(widget = forms.TextInput(
attrs={
'id': 'end-year'
}
))
grade_letter = forms.ChoiceField(
choices= get_grades(get_year())
)
To get the list of grade_letters for choice I need to know the end_year value. How can I get the value of end_year field before the submit (when the user wants to choose grade_letter)?