We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8091
    • 14 Posts
    Hi,

    I’m currently working on a new site, or really just starting to understand how modx and eforms work.

    The current gripe I’m having is with this eForm thing... I’m slowly starting to understand how it works, but would really appreciate if someone could correct my understanding?

    1. form is on page generated by defined code chunk. This gets included into the page and written in by the tpl argument of the eForm call.

    2. &report is the place it gets sent to next... i presume this is when all the fields are filled, don’t really understand where you fill in the rest of the conditions, but that’s not so important. The form redirects to itself, thats clear, and it’s clear that it uses the generated validation message.

    3. I’m once again presuming that the page now touches report and then gets sent to &thanks, but I would like to know.

    Would anyone be able to clear that one up for me please? I’ve been looking on http://www.kagoshima-it.go.jp/~nagayosi/modx095/assets/snippets/eform/docs/eform_examples.htm but can’t see where it says what the extra arguments are for... maybe i’ve missed something.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      &report is the template used for the mailed report.

      The form is taken from the &tpl chunk, as you say.

      The form’s "action" is the same page, where the snippet now checks the postback and reloads the form with the error messages if necessary.

      If all is well, then a number of things happens.

      There are several "events" that can get triggered, if you’ve written snippets with functions for them, and specified them in the argument list.

      Normally, it simply generates the email based on the &report template chunk which it fills out with the POST data as placeholders in the HTML form, mails it out, then redirects the browser to the "thank-you" page, which may also be built using the &report template if you like. By default, it will simply load the same page with a basic "thank you" message.

      The problem is that it’s so flexible. The best thing to do is read the examples and the argument list again in the documentation, then try stuff out and see what happens if there’s still something you don’t quite understand.
        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
        • 30223
        • 1,010 Posts
        Have a look at /assets/snippets/eform/docs/eform.htm. All snippet parameters (and more) are explained there.