We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24904
    • 79 Posts
    Quote from: BobRay at Sep 21, 2008, 09:45 PM

    I think the report is supposed to be a chunk, not a document.


    I tired this aswell, still does not work.


    How do you guys add a contact form to modx?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      1. Create the chunk to contain the form template.
      2. Create the chunk to contain the report template.
      3. Put the snippet call where I want the form to appear.

      The snippet must be uncached [!eForm...!] if the page it’s on is cached.

      See my demo site’s Manager for my own "contact us" form. Except for a variation on spam prevention and an extra function snippet to get and report the submitter’s IP address, it’s a stock eForm contact form.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 16278
        • 928 Posts
        Are all those non-breaking space entity codes actually there in your snippet? This won’t go down very well with PHP if so. huh

        $params = array (
           // Snippet Path
           ’snipPath’ => $snipPath, //includes $snipFolder
        ’snipFolder’ => $snipFolder,)
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Looks like somebody did a copy/paste from a web page.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 33337
            • 3,975 Posts
            Your &formid isnt matching...

            <form method="post" action="[~[*id*]~]" id="EmailForm"> ....
            
            [[eForm? &formid=`contact-us` .....
            

            Both should be same for eForm to work right.
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 36592
              • 970 Posts
              I think this line have to be edited too... ?
              <input name="formid" type="hidden" value="ContactForm" />
                • 33337
                • 3,975 Posts
                Quote from: tkfm at Sep 22, 2008, 04:08 AM

                I think this line have to be edited too... ?
                <input name="formid" type="hidden" value="ContactForm" />


                Yes, but that line isn’t needed anymore for latest eform to work. Its safe to delete and not to use this line.
                  Zaigham R - MODX Professional | Skype | Email | Twitter

                  Digging the interwebs for #MODX gems and bringing it to you. modx.link
                  • 24904
                  • 79 Posts
                  just updated the eForm snippet, everything works fine! now smiley
                    • 24904
                    • 79 Posts
                    one question,
                    is it possible to have the emails appear to be sent from the user?
                    example if the user enters his email address on the form as "[email protected]"

                    the form will be sent to me, by "[email protected]"?

                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Yes, use the name of the email field as a placeholder in the &from=`[+fieldname+]` parameter.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org