Skip to content

Commit

Permalink
fix: update field name access in form initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
besque committed Oct 25, 2024
1 parent 6bdfc3d commit 9f7d2dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions portal/forms/teach.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

class InvitedTeacherForm(forms.Form):
prefix = 'teacher_signup'

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for field in self.fields.values():
field.widget.attrs['id'] = f'id_teacher_signup-{field.name}'
for field_name, field in self.fields.items():
field.widget.attrs['id'] = f'id_teacher_signup-{field_name}'

teacher_password = forms.CharField(
help_text="Enter a password",
Expand Down

0 comments on commit 9f7d2dd

Please sign in to comment.