We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I have a couple eForms on a site -- sometimes it’s legitimate for a user to submit the same form a couple times, but there is the "ef_multiple_submit" error that pops up:
    This form was already submitted succesfully. There is no need to submit your information multiple times.

    The code driving this is in assets/snippets/eform/eform.inc.php:

    if( isset($_SESSION[$formid.'_hash']) && $_SESSION[$formid.'_hash'] == $hash && $hash!='' )
                return formMerge($_lang['ef_multiple_submit'],$fields);


    It would appear that the form can only be submitted once per session. Is this correct? Is there some other way to work around this?
      • 38685
      • 59 Posts
      Hi Everett...
      You could change the eform.inc.php code for example your....

      if( isset($_SESSION[$formid.'_hash']) && $_SESSION[$formid.'_hash'] == $hash && $hash!='' )
                  return formMerge($_lang['ef_multiple_submit'],$fields);


      could be changed to....

      if( isset($_SESSION[$formid.'_hash']) && $_SESSION[$formid.'_hash'] == $hash && $hash!='' )
                              if (isset$fields['[color=red]a field placeholder from eform[/color]'] = 'true') 
                                return true;
                                       }
                  return formMerge($_lang['ef_multiple_submit'],$fields);


      then it would exit out of the error message since that $field exists in your eform otherwise it won’t... eg for sites with more than one eform call!

      BTW I’m only new at PHP so their might be an syntax error in the above... Newbies learn to love parse errors! LOL

      Hope this helps!
        Paul AL Bakulich - Association for Computing Machinery Professional Member
        http://palbakulich.me/ | http://twitter.com/#!/palhmbs
        • 7914
        • 137 Posts
        I know this is an old post, but thought I would update it with something I found that may help if anyone comes across this:
        eForm Help

        Specificly:
        &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).