Multiple records after "double postback" in Contour
Hi, when submitting a form and clicking refresh on the "Thank you" page,
the form is posted once more and an extra record with the same info is
added to contour. Is it possible to remove this "feature"?
Hi Fuji, thanks for reply. The problem only occurs when I use the built in "Thank you" message, not "Send to page". The problem is in Internet Explorer and Firefox, you'll get a message if you hit the "F5" button to resend the page or cancel, if you hit the "ok" the form is submitted twice.
But the way that I solved this, is by the following:
The form is set to manual approve, and 2 Workflows a created.
First set when the form is submitted, and the second when the form is approved ( the approved part is not necessary, for this to work. But I think is a good way the se it in action )
When the user submits the form or hits f5, I just test if there is an approved form whit the same email ( this can be altered to different fields, e.g. the message & email & date ) if there is no record approved in the list. It continues to automatic approve the form with this Contour function.
RecordService service = new RecordService(record); service.Approve(); service.Dispose();
Multiple records after "double postback" in Contour
Hi, when submitting a form and clicking refresh on the "Thank you" page, the form is posted once more and an extra record with the same info is added to contour. Is it possible to remove this "feature"?
Hi Krisitian,
What happens if you choose a different node for your "Thank you" Page?
You shouldnt be getting an extra record. Have you tried using another browser ?
Hi Fuji, thanks for reply. The problem only occurs when I use the built in "Thank you" message, not "Send to page". The problem is in Internet Explorer and Firefox, you'll get a message if you hit the "F5" button to resend the page or cancel, if you hit the "ok" the form is submitted twice.
We'll just use the "Send to page" option for now.
I had the same problem a few days ago, and found that deleting a row in code behind, in the Workflowtype fails.
http://our.umbraco.org/forum/umbraco-pro/contour/23003-workflow-delete-record-not-working
But the way that I solved this, is by the following:
The form is set to manual approve, and 2 Workflows a created.
First set when the form is submitted, and the second when the form is approved ( the approved part is not necessary, for this to work. But I think is a good way the se it in action )
When the user submits the form or hits f5, I just test if there is an approved form whit the same email ( this can be altered to different fields, e.g. the message & email & date ) if there is no record approved in the list. It continues to automatic approve the form with this Contour function.
RecordService service = new RecordService(record);
service.Approve();
service.Dispose();
http://pastebin.com/U2y2NVdK
Thanks Lasse for your reply, I'll try out your solution, but it had been best if Contour had control of this it self :-)
is working on a reply...