Answer the question
In order to leave comments, you need to log in
How to display the dynamic number of form fields?
Hello I have a form class like this
class TestForm(forms.Form):
def __init__(self, amount):
self.questions_list = []
super(TestForm, self).__init__()
for i in range(amount):
answer = forms.BooleanField(label="Ответ", required=False)
self.questions_list.append(answer)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question