Thanks Jens, yes the send/forward seems to at least address a few of the cases that I have - not sure if it disallows the forms unless I use continuations in the forms (right now I am not, mostly just sending the request to the current URL. I'll have to see.
Yes, I worked through and read the Continue tutorial a few times and use redirect/get to work around the double submit error. But -- I think -- the redirect/get only avoids something like refreshing the page from leading to a new submit, although I may be wrong. I thought I used it in some places where I was able to go back and resubmit. I should double check, since I am not using redirect/get everywhere, so that may be the issue. Cheers, Marc On Fri, Sep 20, 2019 at 1:38 PM Stephen De Gabrielle < spdegabrie...@gmail.com> wrote: > Maybe also relevant > > > https://docs.racket-lang.org/continue/index.html#%28part._.The_.Double_.Submit_.Error%29 > > The whole Continue tutorial is worth the time spent. > > s. > > > On Fri, Sep 20, 2019 at 12:32 PM Jens Axel Søgaard <jensa...@soegaard.net> > wrote: > >> Is `send/forward` what you need? >> >> Den fre. 20. sep. 2019 kl. 11.43 skrev Marc Kaufmann < >> marc.kaufman...@gmail.com>: >> >>> Hi all, >>> >>> disclaimer: I am guessing that my current design simply doesn't allow me >>> (easily) what I want, but there may be a solution I am unaware of. >>> >>> In my Racket-powered website I want to disable the back button or keep >>> people from using the back button to resubmit (with different data) a >>> previous form or hit a link that is an embedded continuation to a function >>> that should not be called twice. >>> >>> One way I can do this is to set some variable in the database when the >>> form is submitted or one of several links clicked on a page and check >>> whether it already is set and disallow new submits (or some such). However, >>> I want to do this in many places and don't want to sprinkle all my code and >>> database with names that I can't track. I tried to achieve this by defining >>> a new variable in the request itself that I set to #false initially and >>> then set! to true when any link is hit -- but this fails if a person comes >>> back, refreshes the page and clicks the link, since this creates a new >>> instance of the variable. >>> >>> Qualtrics surveys have this feature, but the way they implement it is (I >>> think) by being single-page apps where the 'Next' button loads the new page >>> content via an Ajax call. I don't see how to turn my current website into >>> that without substantial rewrites. >>> >>> Cheers, >>> Marc >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Racket Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to racket-users+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/racket-users/7e356eb4-e886-4f9c-90cd-0db658d14a91%40googlegroups.com >>> <https://groups.google.com/d/msgid/racket-users/7e356eb4-e886-4f9c-90cd-0db658d14a91%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> -- >> Jens Axel Søgaard >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-users/CABefVgzmMJMrqjAF4JXJU7txX9hU5HWBrfREP915j8ggi%3Dmt5w%40mail.gmail.com >> <https://groups.google.com/d/msgid/racket-users/CABefVgzmMJMrqjAF4JXJU7txX9hU5HWBrfREP915j8ggi%3Dmt5w%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAD7_NO6daWvM0Qy4dPMgNsuyfUD990xtKJNEv7WiwNniYUYwXw%40mail.gmail.com.