On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I followed the tutorial for setting up an eForm from the documentation in the docs directory. Everything seems to be working great.

    When a form is submitted I receive the thank you message no issues. When I refresh the browser I get the following message:
    "This form was already submitted successfully. There is no need to submit your information multiple times."

    I didn’t see any reference to this information while I was following the tutorial. Where is this message stored and can I edit it or do away with it all together?

    • It’s stored in assets/snippets/eform/lang/english.inc.php.
      $_lang['ef_multiple_submit'] = "<p>This form was already submitted succesfully. There is no need to submit your information multiple times.</p>";
      • And to answer your next question . . .  wink

        ef_multiple_submit is on line 412 of assets/snippets/eform/eform.inc.php (in the version of eForm I have, anyway).

        There’s a debug line just above that. If the $debug parameter is set, it will print out the hash values for the current message and the previous message (stored in the session variable).  eForm saves a hash of each message in a $_SESSION variable and compares a hash of the current message against it to check for re-submissions.

        I’m going to guess they’re both blank, but I don’t know what would cause that.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • You can disable this feature if you want also by adding &protectSubmit=`0` to the eForm call.

          &protectSubmit(optional) defaults to 1 (on)
          Protects against submitting a form multiple times with the same data. Submitting the form becomes disabled after the first successful submit while the value from key form fields remains the same. This is achieved by setting (and comparing) a session variable with an md5 hash from these key fields. Which fields are compared depends on the value of &protectSubmit.Possible values are 0 (off), 1 (all ’required’ fields are used) or you can set a comma separated list of field names. To ensure that the session variable works separatedly for different forms the session variable name is based on &formid ({formid}_hash).
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don&#39;t know what it is.
            Do you, Mr. Jones? - [bob dylan]
          • Thank you. That’s very helpful info.