We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12584
    • 208 Posts
    I have 3 sites in total 2 have this same problem one works fine.
    I can only guess the problem appeared after an upgrade at some some pointm My problem is if i click the submit button the form just reloads and no data gets sent, even with the captha turned on it does not give any errors, the form displays on using this call
    [!eForm? &formid=`ContactForm` &subject=`Feedback Form` &to=`[email protected]` &ccsender=`1` &tpl=`ContactForm` &vericode=`1` &report=`ContactFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46`  !]


    Everything used to work and it all looks ok but I have no idea how to find out whats going wrong can anyone give me a few things to try.

    Many thanks
      • 33337
      • 3,975 Posts
      Make sure that &formid is identical in snippet call and in eform template.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 12584
        • 208 Posts
        Thanks for getting back,

        ok everything looks ok there the start of the forum is like this
        <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
        
            <fieldset>
                <h3> Contact Form</h3>
        
                <input name="formid" type="hidden" value="ContactForm" />ContactForm


        and the output on the page when I view the source is like this
        <form method="post" action="index.php?q=contact-us.html" id="EmailForm" name="EmailForm">
        


        Am I missing anything obvious there to me it looks correct.

        Cheers

          • 16278
          • 928 Posts
          From the documentation for v 1.4.4.6:
          &formid
          This is a unique id used to identity a form during postbacks. This is useful in cases where more than one form exists on a page. Your form template should either have a hidden field with the same formid <input type="hidden" name="formid" value="formName" /> or (from eForm 1.4.x) you can set the the id in the form tag itself: <form id="formName"...>;

          Looks like an exclusive sort of OR! I suspect things would work better if you had &formid=`EmailForm` in the call and removed the hidden field in the template. From a quick look at the eForm code, you might find that a second hidden formid field is being generated towards the end of the form, setting its value to be the same as the FORM tag’s ID.
          smiley KP
            • 12584
            • 208 Posts
            Thanks for the help so far I have tried everything but still get the same problem, I even copied the code from the snippet call and contact form chunk on the site that does work ok and pasted it over the top of the problem site but sadly I still got the same error, I checked with the server people in case it was anything to do with Mod Security but everythings fine with that.

            I think i might have hit a brickwall with problem.

            here is the contact page

            the code I am now using for the contact form chunk is

            <p class="error">[+validationmessage+]</p>
            
            <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
            
                <fieldset>
                    <h3> Contact Form</h3>
            
             <span style='color:red'>[+validationmessage+]</span>
            
            
                    <label for="cfName">Your name:
                    <input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /> </label>
            
                    <label for="cfEmail">Your Email Address:
                    <input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /> </label>
            
                    <label for="cfMessage">Message: 
                    <textarea name="message" id="cfMessage" rows="4" cols="20" eform="Message:textarea:1"></textarea>
                    </label>
             <label>Enter the following verification code  in box below: <b>[+vericode+]</b> <br />
                      <input name="vericode" type="text"  /></label>
            
                    <label> </label><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" />
                                     
            
                </fieldset>
            
            </form>
            


            My snippet call is now this

            [!eForm? &formid=`EmailForm` &subject=`[+subject+]` &to=`[email protected]` &ccsender=`1` &tpl=`ContactForm` &vericode=`1` &report=`ContactFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46`  !] 


            Thanks for all help so far
              • 12584
              • 208 Posts
              I am thinking this problem might not be an issue with the html or eform but something else to do with the parsing on the post data, the reason is I also had a problem with the search box which would only output the data of the search if I used ajax and output it on the same page.
              I cant be sure if this is connected to a common problem somewhere but I have re-uploaded the eform files and copied all the code from a working site on the same server to this problem site so something somewhere else must be the issue.
              If anyone has any ideas what could cause the problem I would love to know.

              Many thanks