We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24161
    • 16 Posts
    I’ve searched the forum, and the documentation and the Wiki, and am not sure exactly what’s wrong with my eForm execution.

    Is there a step-by-step tutorial on setting up eForm? I’m not getting an error of any kind, but the form isn’t sending to the email that I enabled in my Contact Us page.


    Here’s the code on my Contact Us Page:
    [[Contact Form? &sendTo=`[email protected]`]]
    
    [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[(email_sender)]` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`46`  !]


    Here’s the code of my ContactForm Chunk:
    <p class="error">[+validationmessage+]</p>
    
    <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
    
    	<fieldset>
    	<input name="formid" type="hidden" value="ContactForm" />
    	<table border="0" cellpadding="2" cellspacing="2">
    		<tr>
    			<td class="b"><label for="cfName">Full Name:</td>
    			<td><input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /> </label></td>
    		</tr>
    		<tr>
    			<td class="b"><label for="cfAddress">Address:</td>
    			<td><input name="name" id="cfAddress" class="text" type="text" eform="Address::1:" /> </label></td>
    		</tr>		
    		<tr>
    			<td class="b"><label for="cfCity">City:</td>
    			<td><input name="name" id="cfCity" class="text" type="text" eform="City::1:" /> </label></td>
    		</tr>				
    		<tr>
    			<td class="b"><label for="cfState">State:</td>
    			<td><input name="name" id="cfState" class="text" type="text" eform="State::1:" /> </label></td>
    		</tr>				
    		<tr>
    			<td class="b"><label for="cfPhone">Phone:</td>
    			<td><input name="name" id="cfPhone" class="text" type="text" eform="Phone::1:" /> </label></td>
    		</tr>				
    		<tr>
    			<td class="b"><label for="cfEmail">Email</td>
    			<td><input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /> </label></td>
    		</tr>
    		<tr>
    			<td colspan="2" class="b"><label for="cfMessage">Message:</td>
    		</tr>
    		<tr>
    			<td colspan="2">
    				<textarea name="message" id="cfMessage" rows="4" cols="20" eform="Message:textarea:1"></textarea>
    				</label>
    			</td>
    		</tr>
    		<tr>
    			<td colspan="2" align="center"><label> </label><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" /></td>
    		</tr>
    	</table>
    
    	</fieldset>
    
    </form>
    


    Any ideas?
      • 11975
      • 2,542 Posts
      Hi,

      first of all you have to choose which snippet you want to use contactForm or eForm



      [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[(email_sender)]` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`46` !]

      To be executed the form id in your chunk must match with the &formid param in your snippet call


      <p class="error">[+validationmessage+]</p>

      <form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">

      <fieldset>
      <input name="formid" type="hidden" value="ContactForm" />
      <table border="0" cellpadding="2" cellspacing="2">
      <tr>
      <td class="b"><label for="cfName">Full Name:</td>
      <td><input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /> </label></td>
      </tr>
      <tr>
      <td class="b"><label for="cfAddress">Address:</td>
      <td><input name="name" id="cfAddress" class="text" type="text" eform="Address::1:" /> </label></td>
      </tr>
      <tr>
      <td class="b"><label for="cfCity">City:</td>
      <td><input name="name" id="cfCity" class="text" type="text" eform="City::1:" /> </label></td>
      </tr>
      <tr>
      <td class="b"><label for="cfState">State:</td>
      <td><input name="name" id="cfState" class="text" type="text" eform="State::1:" /> </label></td>
      </tr>
      <tr>
      <td class="b"><label for="cfPhone">Phone:</td>
      <td><input name="name" id="cfPhone" class="text" type="text" eform="Phone::1:" /> </label></td>
      </tr>
      <tr>
      <td class="b"><label for="cfEmail">Email</td>
      <td><input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /> </label></td>
      </tr>
      <tr>
      <td colspan="2" class="b"><label for="cfMessage">Message:</td>
      </tr>
      <tr>
      <td colspan="2">
      <textarea name="message" id="cfMessage" rows="4" cols="20" eform="Message:textarea:1"></textarea>
      </label>
      </td>
      </tr>
      <tr>
      <td colspan="2" align="center"><label>&nbsp;</label><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" /></td>
      </tr>
      </table>

      </fieldset>

      </form>
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 30223
        • 1,010 Posts
        To elaborate on that.. Firstly make sure you have eForm 1.4.3 (or 1.4.2 at least) and remove the ContactForm snippet from your page... (you can download the most recent eForm from the repository)


        [[Contact Form? &sendTo=`[email protected]`]]
        [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[(email_sender)]` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`46` !]

        Secondly make the id of the form the same as the formid parameter in eForm. And thirdly remove the hidden input "formid". This hidden input used to be compulsory but in recent versions if you have an id attribute for the form it will be used instead. Having both is not necessary.

        Here’s the code of my ContactForm Chunk:
        <p class="error">[+validationmessage+]</p>
        <form method="post" action="[~[*id*]~]" id="ContactForm" name="ContactForm">

        <fieldset>
        <input name="formid" type="hidden" value="ContactForm" />

          • 4971
          • 964 Posts
          Forgive me for the very stupid newbee question...

          I know eForm creates, validates and processes the info...
          it also sends the results to one or many email addresses...

          Q:
          Does it also stores the result in the Database? to be used in the future?
            Website: www.mercologia.com
            MODX Revo Tutorials:  www.modxperience.com

            MODX Professional Partner
            • 25663 MODX Staff
            • 12,272 Posts
            It doesn’t charliez, but you could do that with eForm2db or writing some custom code using the eForm events.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 4971
              • 964 Posts
              Thanks for the quick response rthrash...
              so what do people use eForm for?

              someone fills a form, one or several pages long, in my website and the info goes
              to my email and I answer the email? The info is lost beyond the email and if I
              want to use it I would have to manually input it again...

              sorry, it just seems a little disconnected to have info lost on email...
              or I am totally missing the point?

              PS thanks for the tip on eForm2db (more what I am looking for...)
                Website: www.mercologia.com
                MODX Revo Tutorials:  www.modxperience.com

                MODX Professional Partner
                • 25663 MODX Staff
                • 12,272 Posts
                eForm was originally designed to handle email forms like simple contact forms, etc. It’s grown in capabilities and getting better.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 4971
                  • 964 Posts
                  Yes, thanks... I just read the eForm2db thread and that is perfect...
                  and I agree on keeping both separate so people use eForm for simple
                  form processing and use eForm2db for updating dbs and writing the
                  admin side of websites and webapps... this is great but there is so much
                  to read and you guys are moving at the speed of light... hard to catch up
                  but enjoying it....
                  Thanks again...
                    Website: www.mercologia.com
                    MODX Revo Tutorials:  www.modxperience.com

                    MODX Professional Partner