I have the following in my forms.py
to define choices on a form input:
selection = forms.TypedChoiceField (label="Format", choices = (("Choice1", "Choice1"), ("Choice2", "Choice2"), ("Choice3", "Choice3"),widget = forms.RadioSelect, required= True)
And in my template, I currently have the following line of code which allows people to select one of these choices.
{{ formtoaddselection.selection }}
This is fine in general, but I have a corner case where I want to sometimes overwrite those default choices to say CornerCase1
and CornerCase2
.
Is it possible to override those defaults in the template, and if so, how?