[Answered ]-Django dynamic form thinks it has been posted

2👍

Your __init__ method should be:

def __init__(self, variable, *args, **kwargs):
    super(TestForm, self).__init__(*args, **kwargs)

I’m not sure if that’s your problem, or a typo in your question. Your example code means that the form will be initialised with data=args.

Leave a comment