Hi there!
First, i would like to be sure it's a bug, so i'm asking here first.
I'm using formtools to make a confirmation to my submit.
So my modelform have a method with a ChoiceField that queries the database with a given code in the url and fill the combobox.
So, to make it work, i have to call get_initial and pass the data.
After i post, the form is invalid because, when it validates, there's no data anymore.
And the post have the same behaviour.
Putting form = self.form(request.POST, auto_id=self.get_auto_id(), initial=self.get_initial(request)) in the code for both cases, make it work.
It's a thing that should be in the code, or i should override those methods?
Hi there! First, i would like to be sure it's a bug, so i'm asking here first.
I'm using formtools to make a confirmation to my submit. So my modelform have a method with a ChoiceField that queries the database with a given code in the url and fill the combobox.
So, to make it work, i have to call get_initial and pass the data. After i post, the form is invalid because, when it validates, there's no data anymore.
And the post have the same behaviour.
Putting
form = self.form(request.POST, auto_id=self.get_auto_id(), initial=self.get_initial(request))
in the code for both cases, make it work.It's a thing that should be in the code, or i should override those methods?
Thanks in advance!