We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30223
    • 1,010 Posts
    Quote from: Izumi at Sep 29, 2006, 03:28 PM

    1.) Is there a way to add a Pull down menu option for the subject and have that posted as the subject in the email? Kind website feedback, Feature request, etc as a subject?

    Yes, just add a selectbox named subject with the options you want.

    <p><label for="subject">Subject</label>
    <select name="subject">
            <option value="Website feedback">Website feedback</option>
            <option value="Support request">Support request</option>
            <option value="Feature request">Feature request</option>
        </select></p>
    

    You’ll probably recognize this being very similar to the example that comes with eForm 1.3 except that in the example this was being used to select the TO email address. In this case it will set the subject of the email and sent the email to whatever you have set the &to parameter to.

    2.) Is there a way to get the result email sent showing the person’s name and email address as the sender instead of the CMSs registered email address?

    No you cannot set the FROM email header that way, for reasons why see this post: http://modxcms.com/forums/index.php/topic,7521.msg52944.html#msg52944

    Also in the email I get the subject just has the RE: but no subject in the body of the email it’s looking for a <code>[+subject+]</code> ?
    Did you set the &subject parameter in the snippet call? mind you in your case the answer to your first question should solve that anyway.

    I don’t like the fact that you can leave the subject empty though. I might change the behaviour and set some default subject if it’s not set in any other way.
      • 4707
      • 73 Posts
      Quote from: TobyL at Sep 29, 2006, 11:19 PM

      The placeholders are ’targets’ for eForm to fill with data, while the snippet call is a source to supply eFrom with data. I don’t know if you ever could use these placeholders in the snippet call.. Where would eForm get the data from? The eForm placeholders are used in the report, autotext and report template and (generated by the form parser) in the form template.

      &from needs one or more regular email addresses, while &fromname expects a real name. You can leave them empty in which case they will be filled with the ’email sender’ and the ’site name’ as set in the MODx configuration.

      Hmmm, yeah, what you say makes sense. It’s just that the [+name+], [+email+] and [+subject+] placeholders did work as call parameters in version 1.2.... and [+subject+] can still be used as such... guess I got a little confused grin

      Thanks smiley
        • 29655
        • 16 Posts
        I have a long form that i’m making which involved multiple (2) textareas. I’ve noticed though that eForm doesn’t support more than one. Is this a known issue or am I making a mistake?
          • 30223
          • 1,010 Posts
          Version 1.3 certainly supports multiple textareas, some earlier version didn’t. Did you download 1.3?
            • 13284
            • 95 Posts
            Thanks guys for the help,

            I got it working with the subject now. TobyL, since I don’t understand a lot of how this stuff works I’ll take it that you can’t do it that way what I’m looking for as in having the entered email address as the senders when i get the email. On my current HTML page I’m using a php form mail that does that it puts their name and email as the return name and email, again I’m sure that is different from how the snippet is made for MODx and stuff but maybe there is something there that you might some day be able to do it?

            The site is: http://www.leveltendesign.com/L10Apps/Fm/ for that

            One last thing to ask of you guys if it’s not too much trouble I know I’ve been a pain but I’m just all new to this stuff. Basically I’m having some kind of HTML problem or something the site is at:
            http://www.tapanime.com/cms/pageinfo/contact.php

            As you can see the submit button and i moved the error code below the submit button are both below and behind my footer so you can’t seem them and I don’t know why? Any thoughts? I’m using the Animetor-Metal template that Susan made and helped me tweak I just can’t figure out why it’s doing that here is my form code:

            <form method="post" action="[~[*id*]~]">
                <input type="hidden" name="formid" value="feedbackForm">
                <label accesskey="n" for="Name">Your Name</label>
                <input type="text" name="Name" maxlength="60" eform="Your Name::1><br>
                <br>
                <label accesskey="e" for="email">Your Email Address</label>
                <input type="text" name="email" size="40" maxlength="40" eform="Your Email Address:email:1"><br>
                <br>
            <label for="subject">Subject</label>
            <select name="subject">
                    <option value="Website feedback">Website feedback</option>
                    <option value="Support request">Support request</option>
                    <option value="Feature request">Feature request</option>
                </select>
            <br>
                <label accesskey="c" for="comments">Comments</label>
                <textarea cols="40" rows="10" name="comments" eform="Comments:html:1"></textarea><br>
            <br>
                Please enter the anti spam code below:<br>
                <img src="[+verimageurl+]" alt="verification code" border="1">
                <br>
                <label accesskey="c" for="vericode">code</label>
                <input type="text" name="vericode" size="20">
            <br>
                <input type="submit" name="submit" value="Send Feedback"><br>
                <span style="color:#900;">[+validationmessage+]</span><br>
            <br>
            </form>
              • 29655
              • 16 Posts
              Quote from: TobyL at Sep 30, 2006, 03:15 AM

              Version 1.3 certainly supports multiple textareas, some earlier version didn’t. Did you download 1.3?
              Well that’s a little embarassing. I thought I upgraded and I hadn’t... All is well, thank you TobyL
                • 30223
                • 1,010 Posts
                Quote from: Izumi at Sep 30, 2006, 10:03 AM

                As you can see the submit button and i moved the error code below the submit button are both below and behind my footer so you can’t seem them and I don’t know why? Any thoughts? I’m using the Animetor-Metal template that Susan made and helped me tweak I just can’t figure out why it’s doing that here is my form code:

                That has nothing to do with eForm and everything to do with your template... It looks like the middle column is of a fixed height and does not have the overflow set to scroll or auto. Fix your css and the form will show. And if you can’t work it out place a question in an appropriate forum...
                  • 6798
                  • 3 Posts
                  I installed eForm 1.3 (downloaded from the repository) and folowed the example exactly as in the docs, but what i get is:

                  « MODx Parse Error »
                  MODx encountered the following error while attempting to parse the requested resource:
                  « PHP Parse Error »

                  PHP error debug
                  Error: Invalid argument supplied for foreach()
                  Error type/ Nr.: Warning - 2
                  File: c:\arquivos de programas\easyphp1-8\www\modx\assets\snippets\eform\eform.inc.php
                  Line: 49
                  Line 49 source: foreach($formats as $k => $discard) $fields[$k] = ""; // store dummy value inside $fields

                  Any help in what may be the problem?
                  Thanks!
                    • 25663 MODX Staff
                    • 12,272 Posts
                    Quote from: Cassiel at Sep 29, 2006, 11:52 PM

                    Quote from: TobyL at Sep 29, 2006, 11:19 PM

                    The placeholders are ’targets’ for eForm to fill with data, while the snippet call is a source to supply eFrom with data. I don’t know if you ever could use these placeholders in the snippet call.. Where would eForm get the data from? The eForm placeholders are used in the report, autotext and report template and (generated by the form parser) in the form template.

                    &from needs one or more regular email addresses, while &fromname expects a real name. You can leave them empty in which case they will be filled with the ’email sender’ and the ’site name’ as set in the MODx configuration.

                    Hmmm, yeah, what you say makes sense. It’s just that the [+name+], [+email+] and [+subject+] placeholders did work as call parameters in version 1.2.... and [+subject+] can still be used as such... guess I got a little confused grin

                    Toby et al,

                    Here’s a link to the original hack by Garryn that allowed subject/from/fromname to come from eform fields. It’s really handy and I can attest that it works well.
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 30223
                      • 1,010 Posts
                      Thanks, I’ll have a look at it and see if I can add it in.

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