We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26521
    • 10 Posts
    I tried the examples from eForm (in their documentation) as well as the example from the Wiki...

    The form seems like it works, although it’s hard to tell (it doesn’t take you to an additional page). And I don’t receive an email...

    I guess my question is this... In my ’contact’ page, I have the chunk called... ContactForm

    example:

    {{ContactForm}}

    Where do I put the snippet (see example below)? I put that code into a snippet called eForm...

    <?php
    [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]`
    &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`1` !]
    ?>

    Do I put it in my contact page? This is how I have my contact page set up in modx

    {{ContactForm}}
    {{eform}}

    Lastly... After a user sends the form, how can I get the user to be redirected to another page (ie a thank you page)?


    Thanks for your help and feedback!
      • 30223
      • 1,010 Posts
      Read this about snippets
      and read the documentation for eform again which you can find in your asstets/eform/docs/ folder

      And then off course there’s the wiki about eForm and a whole lot more
        • 26521
        • 10 Posts
        Quote from: TobyL at Feb 28, 2007, 07:25 AM

        Read this about snippets
        and read the documentation for eform again which you can find in your asstets/eform/docs/ folder

        And then off course there’s the wiki about eForm and a whole lot more

        I really appreciate the feedback... And I totally have the concepts down, however, I think I’m having a problem with the snippets part. I’m not sure exactly how to include the snippet into a document. It comes up as non-HTML and just plain text...

        In my Contact page; this is what I have...

        {{ContactForm}}
        [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` 
        &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`1`  !]


        Also... I made sure that my page was not cacheable...
          • 25663 MODX Staff
          • 12,272 Posts
          It looks like your snippet call is on two lines. That won’t work; if it is put it on one line and see if it outputs anything.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 26521
            • 10 Posts
            Quote from: rthrash at Feb 28, 2007, 09:40 AM

            It looks like your snippet call is on two lines. That won’t work; if it is put it on one line and see if it outputs anything.

            Nope... It’s on one line...

            I put a screenshot in the post here...
              • 19726
              • 239 Posts
              Note that you should not have the {{ContactForm}} chunk in your document. When you call the eForm snippet it will generate the form from the &tpl parameter you passed to the snippet.
                • 26521
                • 10 Posts
                Quote from: Mitch at Feb 28, 2007, 10:45 AM

                Note that you should not have the {{ContactForm}} chunk in your document. When you call the eForm snippet it will generate the form from the &tpl parameter you passed to the snippet.

                Awesome thanks... Makes sense! grin

                However, I’m still getting the snippet to be read as text and not code...
                  • 14779
                  • 256 Posts
                  I know I’m replying two years after the last post, but I had trouble with this myself, and thought I could clear this up for anyone searching the forum.

                  If the snippet is showing up as plain text, and not rendering the form (i.e., MODx is not parsing the snippet call), Edit the HTML of the page the snippet call is on.

                  Your snippet probably looks like this:

                  [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`1`  !]
                  

                  What you need to do is remove the
                  &
                  and replace with a plain ampersand:
                  &
                  .

                  Save the doc, and it should be working. This appears to be a result of the Rich-text editor, replacing the ampersand with the html code for an ampersand. On some docs I have dealt with, I have had to turn the rich-text editor off in order to deal with the eform snippet call.
                    PM me to find out how you can get a FREE ipad 2!