We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20535
    • 4 Posts
    Just need a second set of eyes to look at this code. This form loads, looks and funcions as it should except the emailing of form info. I have three forms and none of them send the info from the form to the designated e-mail address.

    Please!!! Someone check out this code and tell me what I’m not seeing.

    [!eForm? &amp;formid=`ContactForm` &amp;subject=`[+subject+]` &amp;to=`[email protected]` &amp;ccsender=`1` &amp;tpl=`ContactForm` &amp;report=`ContactFormReport` &amp;invalidClass=`invalidValue` &amp;requiredClass=`requiredValue` &amp;cssStyle=`ContactStyles` &amp;gotoid=`46` !]</p>

    Thanks for the help.
    Sean Lambert
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      If you pasted that verbatim, then the Snippet call got corrupted because your page is allowing Rich Text; note that each Snippet parameter must be preceded by an ampersand, e.g.
      &parameter=`something`

      But when you have TinyMCE as your editor and the page is set to accept Rich Text, those "&"’s get converted to the HTML equivalent: &amp; -- the result is that the whole Snippet call gets corrupted.

      What I like to do is for any page that uses Snippets, I go to the "Page Settings" tab when I’m editing that page, and I uncheck "Rich Text" -- I also change the "Editor to Use" down below to "None" -- this helps cut down on any replacing of ampersands.

      Your Snippet call must look like this:
      [!eForm? &formid=`ContactForm` ... 


      and NOT like this:
      [!eForm? &formid=`ContactForm` ... 


        • 16278
        • 928 Posts
        Using plain ampersands rather than allowing the rich text editor to subsitute &amp; entities is certainly easier to read and maintain, but in my experience snippets still work with the entity code, and it doesn’t seem to be the root of Sean’s problem, either:
        This form loads, looks and funcions as it should
        Maybe a look at PHP error logs would be a good starting point, or some tests with simple scripts to check if PHP email is functioning properly at all on the site?
        cool KP
          • 3749
          • 24,544 Posts
          The most common issue for this problem is the host having the mail() function turned off (or operating on localhost with no mail server). The easiest solution is to configure eForm to use SMTP.

          I usually use SMTP to begin with on mail scripts so I won’t get a nasty surprise when the host decides to turn mail() off.
            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
            • 20535
            • 4 Posts
            thank you all for your thoughts. I will look at the logs and try to configure for SMTP