We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1343 ☆ A M B ☆
    • 2,213 Posts
    That is going to have issues as you have invalid code in the call, the correct method would be something like this:

    [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[+emailsender+]` &ccsender=`1` &tpl=`customcontactform` &report=`ContactFormReport` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`ContactStyles` &gotoid=`46` !]

    This is assuming you have a field with the name "emailsender" Using [(____)] is for calling system items such as [(site_url)] and thus has no use for email as in your code.

    The [/b][/u] I am guessing are your desire to point out that block of code, otherwise they have no place in the above.

    In general the call is fine except as noted above and should work fine. If you are having problems with the output could you share a link to the site in question so we can take a closer look? Or if you don’t want the link out shoot me a PM with it and I will take a look for you.
      Patrick | Server Wrangler
      About Me: Website | Tweets |  MODX Hosting
      • 20014
      • 200 Posts
      you called it, I was exactly trying to draw your attention to those parts, thanks a bunch AMDbuilder and BobRay for your help, think I have it.
      the code above apart from the bold and underline tags added, was the original code which came in the default template for ContactForm. so you are saying the code you provided would be more appropriate?

      apart from that did I do alright by leaving the form id and simply adding classes to the original ContactForm, saving it as a custom chunk and then setting the ContactForm snippet part &tpl to refer to that new custom chunk?

      should i set &to=`[(emailsender)] to &to=`[([email protected])]? not sure what you mean by :
      "This is assuming you have a field with the name "emailsender" Using [(____)] is for calling system items such as [(site_url)] and thus has no use for email as in your code."

      the site is static on the live server, this form is still on local, and since it’s on a win machine I am a little apprehensive about opening ports. once it goes live, I would love to have you take a gander.

      now if it works, I am going to have to scour the wiki to see if I can find a way to set up captcha as it is in on other login and reply fields. I know I will have to check with the host for support though prior to setting it up. though, I am not sure how robust the modx system is. just more to impress the client I suppose. rolleyes

        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Sorry about the confusion, to use an email address from the form you need to use [+fieldname+] if you use [(emailsender)] then it will try to send the email to "[(emailsender)]" which isn’t going to work.

        The easiest way to use it would be &to=`[email protected]` or the slightly harder method would be &to=`[+email+]` in which case you would need a line like this in your form:

        <input type="hidden" value="[email protected]" eform="::0:" />

        The second exposes the destination email address so it would be best to use the first method of &to=`[email protected]` unless you have a dropdown select who gets the email in which case things get more complex.

        I must have missed the home server part, so once the site launches if you want me to take a look let me know.

        As for captcha that can be done with eform as well, check example contact form in the documentation (assets/snippets/eform/docs) or check this site: http://codingpad.maryspad.com/2009/05/31/building-a-website-with-modx-for-newbies-part-9-adding-a-contact-form-using-eform/

        Enjoy
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 20014
          • 200 Posts
          excellent AMDbuilder!!, then the script in the the thank you page of:

          <?php
          $to = '[email protected]';
          $subject = 'subject';
          $message = 'From: ' . $_REQUEST['name'] . "\n\n" . $_REQUEST['data'];
          $email = $_REQUEST['email'];
          $headers = 'From: ' . $email . "\r\n" .
                      'Reply-To: ' . $email . "\r\n" .
                    'X-Mailer: PHP/' . phpversion();
           
          mail ($to, $subject, $message, $headers);
          header("Location:" . $linkID);
          ?>


          nor the &linkID=`[~46~]` snippet call in the contact me page isn’t needed? or should I leave in just in case?

          the snippet call on the contac me page ,as you wrote it will tell the server where to send the text as well as redirect to the thank you page without the above snippet or hidden buttons in the form? if the host can use above code, than since it’s php sending the email out via the cms,(I would assume) it shouldn’t have a problem should it?

          the inner workings of this cms is becoming so clear now. thanks for the link to the article! EXCELLENT EXCELLENT EXCELLENT, I have dreaded having to deal with cms, being that my run ins have been with joomla! and drupal, my gosh was joomla! a nightmare! whereas this is a DREAM!!

            • 20014
            • 200 Posts
            AMDbuilder, excellent resource!! Heck it did a lot for me, while I tried to figure out on my own with a few scroogle searches of course.
            but I am glad I had to do this, because it allowed me to view each element and fully understand each.

            thank you guys so much for your patience and understanding, problem solved!
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Glad to hear you got it worked out! It took me about a year after setting up my first MODx site to realize what I was missing, now I’m up to about 15 sites all MODx drive with at least three more planned for the upcoming break!

              If you have more questions speak up we are happy to help!
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting