We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6739
    • 15 Posts
    I’m pretty new to modx and I’m working with eForm for the first time. Where in the Snippet code to i simply put the email addres i want the form info sent to? I know this may seem like a simple thing to do and I may be missing something here. If anyone can tell me what I’m missing I’d appreciate it. Thanks.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      By default, it will send to the email address you have in your site Configuration (in the User tab). You can specify it in the snippet tags with the parameter &to=`[email protected]`.

      This can be a comma-separated list of addresses; it can also be a value from the form, such as from a list of optional departments to send a message to; &to=`[+department+]`

      If you really want to get fancy, you can use a custom snippet/function and the eFormOnBeforeMailSend event and set the $fields[’to’] value in the function. I prefer to use an external config.php file for eForm’s configuration if things are that complicated, though. Since it’s a normal .php file any complex conditionals can be done there, without the added overhead of more snippets.

      (I know, more information than you wanted, but hey! This is MODx; there’s always more than just one or two ways to do things!)

        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