We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17622
    • 39 Posts
    Hi,

    I’ve implemented the eForm from the wiki and modified it slightly.

    The ai-contact-form template:

    <p><span style="color:#900;">[+validationmessage+]</span></p>
     
    <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
      <input name="formid" type="hidden" value="ContactForm" />
    
      <dl>
        <dt><label for="cfName">Your name *</label></dt>
        <dd><input name="name" id="cfName" class="text" type="text" size="40" maxlength="60" eform="Your Name::1:" /></dd>
    
        <dt><label for="cfEmail">Your Email Address *</label></dt>
        <dd><input name="email" id="cfEmail" class="text" type="text" size="40" maxlength="40" eform="Email Address:email:1" /></dd>
    
        <dt><label for="cfRegarding">Regarding *</label></dt>
        <dd><input name="subject" id="cfRegarding" class="text" type="text" size="40" maxlength="40" eform="Form Subject::1" /></dd>
    
        <dt><label for="cfMessage">Message *</label></dt>
        <dd><textarea name="message" id="cfMessage" cols="50" rows="10" eform="Message:textarea:1"></textarea></dd>
    
        <dt>Please enter the anti spam code below:</dt>
        <dd><img src="[+verimageurl+]" alt="verification code" border="1"/></dd>
    
        <dt><label accesskey="c" for="vericode">Anti-spam code *</label></dt>
        <dd><input type="text" id="vericode" name="vericode" /></dd>
      <dl>
    
      <label> </label><p><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" /></p>
    </form>
    


    The ai-contact-form-report template:

    <p>This is a response sent by <b>[+Name+]</b> using the feedback form on this website. The details of the message follow below:</p>
     
    <p>Name: [+name+]</p>
    <p>Email: [+email+]</p>
    <p>Regarding: [+subject+]</p>
    <p>Comments:<br />[+message+]</p>
     
    <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE: [+subject+]">[+email+]</a></p>
    


    [!eForm? &formid=`ContactForm` &subject=`[AI] [+subject+]` &to=`<email address here>` &ccsender=`1` &tpl=`ai-contact-form` &report=`ai-contact-form-report` &vericode=`1`!]
    


    But when I send it, I get the following message:

    This form was already submitted succesfully. There is no need to submit your information multiple times.
    


    What’s going on? The email is being sent though.

    Thanks,
    Luke.
      • 30223
      • 1,010 Posts
      You probably clicked the submit button twice.. eForm has some protection against multiple submits, saving you from receiving multiples of the same emails. You can however turn this off if it is bothering you. Simply set the parameter &protectSubmit=`0`.
        • 17622
        • 39 Posts
        Quote from: TobyL at Jul 28, 2007, 07:39 PM

        You probably clicked the submit button twice.. eForm has some protection against multiple submits, saving you from receiving multiples of the same emails. You can however turn this off if it is bothering you. Simply set the parameter &protectSubmit=`0`.


        Not clicking it twice. I’ve also had 2 other people try the form, same happens to them. Feel free to try it out.

        Luke.
          • 33337
          • 3,975 Posts

          <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
          <input name="formid" type="hidden" value="ContactForm" />

          Loose the hidden field, and use &formid=`EmailForm` ... try it.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 17622
            • 39 Posts
            Quote from: zi at Jul 28, 2007, 09:09 PM


            <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
            <input name="formid" type="hidden" value="ContactForm" />

            Loose the hidden field, and use &formid=`EmailForm` ... try it.

            Gives me the following:

            Thank You!
            
            Your information was successfully submitted.
            


            Which is a lot better, thanks.

            Luke.