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

    That was quick. Is there an example when I can find how to send an email to the email address provided by the user submitting the form. Becasuse if I dont specify &to, the mail is by default sent to the email address specified in MODx. Any guidance to address my query is appreciated.

    warm regards,

    -Raavi
      • 30223
      • 1,010 Posts
      from the eForm documentation:

      * &sendirect (Optional)
      * This will use the form field called email to supply the
      * email address to send the message to.
      * Set to 1 to activate send direct. Defaults to 0

      so add &sendirect=`1` to your snippet and eForm should use the field <input type=’text’ name=’email’ ... /> as the recipient address
        • 33372
        • 1,611 Posts
        Quote from: Raavi at Sep 21, 2006, 09:01 AM

        1. Can I create a send to friend kind of form with eform?
        2. How can I add the option of multiple file attachments (similar to the modx forum functionality for file attachments, with a max no. of files)
        3. Can I not send the form data by email and have it written to the datatbase or a flat file.

        Actually I think you can accomplish #2 by just having a fixed number of attachment form fields in your template.

        And I think that you can also write the data to a database or flat file if you include this code in the $eFormOnMailSent function. As I understand it, this function exists precisely so that you can extend eForm’s functionality and do whatever you like with the data ater sending the email. So you’d need to write the PHP yourself, but there’s a hook for you to plug it into.

        Oh and it would still send an email out to someone... But I usually prefer to get email notification of form submissions myself. So maybe that’s something you could consider an added bonus in your situation?
          "Things are not what they appear to be; nor are they otherwise." - Buddha

          "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

          Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
          • 24278
          • 165 Posts
          Thanks guys,

          Great help!

          One more question smiley

          I am calling eform from inside another snippet so I have to use $modx->runSnippet(), else it outputs the code instrad of the form. Now, how do make the call $modx->runSnippet() to be uncacheable, similar to the [! ...!] call. Because, currently the form is being cached and hence does not work.

          warm regards,

          -Raavi
            • 33372
            • 1,611 Posts
            Quote from: Raavi at Sep 21, 2006, 10:30 AM

            I am calling eform from inside another snippet so I have to use $modx->runSnippet(), else it outputs the code instrad of the form. Now, how do make the call $modx->runSnippet() to be uncacheable, similar to the [! ...!] call. Because, currently the form is being cached and hence does not work.

            I would think that running the snippet that runs eFrom as uncached would do the trick...
              "Things are not what they appear to be; nor are they otherwise." - Buddha

              "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

              Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
              • 32963
              • 1,732 Posts
              Quote from: Raavi at Sep 21, 2006, 09:01 AM

              3. Can I not send the form data by email and have it written to the datatbase or a flat file.

              Hi,

              Version 2 will allow you to save forms to MODx documents and folders. This means that you will be able to easily create small data driven applications such as Guess Books, Address Books, etc. It think adding a filing option would be a great idea indeed. Nice idea.

              Example of new format:
              [[eForm? &formid="OrderForm"]]
              <form id="OrderForm" process="mail,file,doc,print" email="[email protected]">
              ....
              </form>

              As stated you can now use the $eFormOnMailSent option to interact with the eForm snippet. Future versions will make if much easier to interface other snippet with eForm:

              Example of new format:
              [[eForm? &OnBeforeSendMail=`MySnippet` &OnProcessForm=`MyFormSnippet` ]]

              Version 3 will support writing the form data to a database table without ever needing to create a table. This version will include some flexible data management options that will also allow you to modify data in a very simple manner.
                xWisdom
                www.xwisdomhtml.com
                The fear of the Lord is the beginning of wisdom:
                MODx Co-Founder - Create and do more with less.
                • 7455
                • 2,204 Posts
                What about email verivication so that the form filler gets a mail to activate his account or activate a download from a file or somthing like that
                  follow me on twitter: @dimmy01
                  • 26435
                  • 1,193 Posts
                  ScottyDelicious Reply #238, 20 years ago
                  Quote from: Dimmy at Sep 21, 2006, 03:13 PM

                  What about email verivication so that the form filler gets a mail to activate his account or activate a download from a file or somthing like that
                  that would be fierce.

                  -sD-
                    Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                    All of the above... in no specific order.


                    I send pointless little messages
                    • 32963
                    • 1,732 Posts
                    Quote from: Dimmy at Sep 21, 2006, 03:13 PM

                    What about email verivication so that the form filler gets a mail to activate his account or activate a download from a file or somthing like that

                    It will be possilbe or easier with the newer versions.
                      xWisdom
                      www.xwisdomhtml.com
                      The fear of the Lord is the beginning of wisdom:
                      MODx Co-Founder - Create and do more with less.
                      • 7455
                      • 2,204 Posts
                      Quote from: xwisdom at Sep 22, 2006, 03:10 AM

                      Quote from: Dimmy at Sep 21, 2006, 03:13 PM

                      What about email verivication so that the form filler gets a mail to activate his account or activate a download from a file or somthing like that

                      It will be possilbe or easier with the newer versions.

                      Nice when wil this release be here?
                        follow me on twitter: @dimmy01

                      This discussion is closed to further replies. Keep calm and carry on.