Hello I am trying to submit a form when selection an option on a ChoiceField
class ActionForm(forms.Form):
""" Holds the options for mailbox management """
choices = ['create new folder', 'delete', 'read', 'unread']
action = forms.ChoiceField(choices=choices, attrs={'onchange': 'actionform.submit();'})
but now I get an invallid syntax when I try to load the form. I am pretty sure the attrs={'onchange': 'actionform.submit();'})
is the problem, but not sure how else to do it.