Hi, I'm having some problems with iformless.IRedirectAfterPost. The first time I post my form, I see my results' page with the data posted. But when I use "back" on my browser and I try to post my form again, the IRedirectAfterPost doesn't seem to be done. It bring me back the page with the form posted (no data in my fields). Only once out of two my form is posted correctly even if I'm using the back button. I didn't find out how to fix it. Vicky
On May 27, 2004, at 8:37 AM, vicky wrote:
Hi,
I'm having some problems with iformless.IRedirectAfterPost. The first time I post my form, I see my results' page with the data posted. But when I use "back" on my browser and I try to post my form again, the IRedirectAfterPost doesn't seem to be done. It bring me back the page with the form posted (no data in my fields). Only once out of two my form is posted correctly even if I'm using the back button. I didn't find out how to fix it.
I believe the current version of formless only lets you set IRedirectAfterPost on the request, so you will have to set it on the request object associated with the form post, not the form render -- this could be why you are having problems with the wrong redirect occurring after you use the back button. As for why your form is only working every other time, I can only guess that there must be a problem with your code. Are you sure you are properly waiting on a deferred, if you are using one? I have seen code that doesn't wait on a deferred work "every other time" because in between the first page and the second page render, the first deferred fires, and a callback stores this data in a place where the second page render can find it. dp
Hi dp, I tested one of your examples to see if the problem of IRedirectAfterPost when the preceding button is used occurs in this example too. When the form is correct (no error), I return a result's page with IRedirectAfterPost and a child function (I don't have any differed). Even if, I don't have a differed the same problem occurs. I attached the example with my modification Vicky
I believe the current version of formless only lets you set IRedirectAfterPost on the request, so you will have to set it on the request object associated with the form post, not the form render -- this could be why you are having problems with the wrong redirect occurring after you use the back button.
As for why your form is only working every other time, I can only guess that there must be a problem with your code. Are you sure you are properly waiting on a deferred, if you are using one? I have seen code that doesn't wait on a deferred work "every other time" because in between the first page and the second page render, the first deferred fires, and a callback stores this data in a place where the second page render can find it.
dp
participants (2)
-
Donovan Preston
-
vicky