We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37242 ☆ A M B ☆
    • 339 Posts
    Solution:

    inside the eForm snippet:
      'replyto' => isset($replyto)? $replyto:$_POST['name']."<".$_POST['email'].">",


    Please send kisses, cookies and cakes to: [email protected] smiley

    Guido
      • 10313
      • 375 Posts
      Did you ever try [tt]&replyto=`email`[/tt] ?

      If you set [tt]&replyto=`[+email+]`[/tt], the PH value of [tt][+email+][/tt] at snippet call time will be used. At this moment, the form ist not filled out yet. Just try [tt]&replyto=`email`[/tt]. Then, eForm will handle this string as a form field name and replace it by the filled in value. At least so it does with me.

      Martin
        • 37242 ☆ A M B ☆
        • 339 Posts
        Right, but [+name+] isn’t either. But i will give it a try smiley
          • 37242 ☆ A M B ☆
          • 339 Posts
          Would habe been nice but didnt work. By the way... 1.4.4.5 is the version.
            • 29076
            • 615 Posts
            Quote from: dogo at Jun 26, 2009, 01:43 AM

            Solution:

            inside the eForm snippet:
              'replyto' => isset($replyto)? $replyto:$_POST['name']."<".$_POST['email'].">",


            Please send kisses, cookies and cakes to: [email protected] smiley

            Guido


            You say Solution, does it work? If so, where in the eForm snippet should this piece of code go? smiley Should it replace

            				//$replyto snippet parameter must contain email or fieldname
            				if(!strstr($replyto,'@'))
            					$replyto = ( $fields[$replyto] && strstr($fields[$replyto],'@') )?$fields[$replyto]:$from;
                                
              I think, thererfor I am! But what I am, and why...?
              • 37242 ☆ A M B ☆
              • 339 Posts
              Ok, i had a typo. It works. But why?
              But anyway, my solution is more elegant as the recipient can now save the adress with its name in one single click smiley
                • 37242 ☆ A M B ☆
                • 339 Posts
                Quote from: Sylvaticus at Jun 26, 2009, 02:04 AM


                You say Solution, does it work? If so, where in the eForm snippet should this piece of code go? smiley Should it replace

                Yes it works. But &replyto=`email` instead of &replyto=`[+email+]` works as well. But it only puts the email adress a the "replyto", not the namean adress as my solution does smiley

                Go to ressources, magage ressources, snippets, click on eform snippet, in the middle of the big block "// eForm Params", right after "//Added by JJ".

                Well - at least if you put the right field names as this solution reads directly from $_POST.
                  • 29076
                  • 615 Posts
                  I tried your solution, but there must be something wrong with my setup. What ever I do I only get my host’s email adress in the replyto field.

                  I use eForm 1.4.4.5 on MODx 0.9.6.3.

                  My snippetcall:
                  [!eForm? &formid=`feedbackForm` &to=`[email protected]` &language=`norwegian` &tpl=`eFeedBackLag` &report=`eFeedbackReport` &thankyou=`eFeedBackThanks` &vericode=`1` &subject=`Melding til Kjerringoy båtforening`!]

                  Is there something special that should go into the &tpl chunk?
                    I think, thererfor I am! But what I am, and why...?
                    • 37242 ☆ A M B ☆
                    • 339 Posts
                    Hm... if the field in your form is called "email" try and add "&replyto=`email`" to your snippet call.
                    If you edited the snippet itself like I did, make sure You use the same names for the fields inside the form and the snippet (<input name="mailbox"..> goes into $_POST[’mailbox’])
                      • 1510
                      • 2 Posts
                      I just found to change in eform snippet code
                         'from' => isset($from)? $from:$_POST['email'], //$modx->config['emailsender'], //++ad
                         'fromname' => isset($fromname)? $fromname:$_POST['name'], //$modx->config['site_name'], //++ad
                          ...
                         //Added by JJ
                         'replyto' => isset($replyto)? $replyto:$_POST['name']."<".$_POST['email'].">", //++ad
                         //'replyto' => isset($replyto)? $replyto:"",


                      and removed from snippet call:
                       &fromname=`name` &from=`sender`

                      so in snippet call is only
                       &replyto=`email`


                      That works.