[Catalyst] Double-posted forms (was:Relative links)

radium radium at gmail.com
Thu Nov 10 18:48:40 CET 2005


On 11/10/05, Bill Moseley <moseley at hank.org> wrote:
>
> To help with double-posting I sometimes create a unique ID and place
> it in a hidden field and in the session. Then on submission I make
> sure they match and the remove it from the session.
>

I do something similar. On each form, I generate a unique ID in the form,
but I do not bind it to the session. If the form is submitted and if the
request completes successfully, I mark that ID as expired meaning the form
is "used up". Usually to expire an ID I store it in an indexed table and
keep them around for 3-10 days.

The main advantage to this is that users can work on multiple forms at once.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051110/b0f16932/attachment.htm


More information about the Catalyst mailing list