We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Scratching my head on this one, I'm sure I must just be missing something obvious... have been reviewing the FormIt docs here: http://rtfm.modx.com/extras/revo/formit and can't seem to find a way to help prevent "duplicate POSTs" similar to the way eForm:
    &protectSubmit=`1`
    worked in Evo.

    Does anyone know if there is a way to accomplish this?

    NOTE: I should point out that I am not using the
    &redirectTo
    parameter, successful form submissions stay on the same page. So, if anyone refreshes the page after the post, the form gets submitted twice. Before I hand-craft a solution to prevent this, I wanted to make sure I wasn't bypassing something already baked in.

    This question has been answered by pixelchutes. See the first response.

      Mike Reid - www.pixelchutes.com
      MODx Ambassador / Contributor
      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
      ________________________________
      Where every pixel matters.
    • discuss.answer
      UPDATE: Never did end up finding anything "built in", but was able to write a simple hook that stores an MD5 checksum of the entire $_POST (in $_SESSION), and then compares the previous MD5 against the current hash.

      If they match, simply $hook->addError() and return false. Easy peasy. smiley
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 52927
        • 3 Posts
        Quote from: pixelchutes at Dec 04, 2013, 12:17 AM
        UPDATE: Never did end up finding anything "built in", but was able to write a simple hook that stores an MD5 checksum of the entire $_POST (in $_SESSION), and then compares the previous MD5 against the current hash.

        If they match, simply $hook->addError() and return false. Easy peasy. smiley

        @pixelchutes: Could you elaborate a bit more on how you did this?