We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15197
    • 65 Posts
    I want the subject field to read, "Request From Firstname Lastname."

    I’ve read on this page, http://www.partout.info/assets/snippets/eform/docs/eform.htm, that I should be able to use field forms for this. Per the example, I’m using:

    &subject=`Request from [.firstname.] [.lastname.]`


    However, the result is a subject line that has the first part cut off, and no form field info:

    Request Fro

    I saw similar instructions on this page, http://fatalerror.info/index.php?o=2152&l=3, and noticed the difference was an extra space, but I’m thinking that was just so they didn’t get parsed?

    [. firstname.] [. lastname.] 


    I’m using MODx 1.0.4 and eForm 1.4.4.6.

    Any ideas why this won’t work?
      • 4310
      • 2,310 Posts
      &subject=`Request from [+firstname+] [+lastname+]`
        • 15197
        • 65 Posts
        Thanks for the suggestion, but that was actually the first thing I tried. It just gives me "Request From" and it’s blank after that. I double-checked my form to see if I’d maybe used ’Firstname’ or ’firstName’ or something, but it’s just as the examples, ’firstname’ and ’lastname’.
          • 4310
          • 2,310 Posts
          &subject=`Website Enquiry from [+name+]`

          Works for me where the form field is setup like so :
          <input type="text" name="name" id="name" size="30"  value="" />
            • 15197
            • 65 Posts
            I have this, so it should work, right?

            <input id="firstname" name="firstname" type="text" />
            <input id="lastname" name="lastname" type="text" />


            The placeholders work just fine in the report.

            Here’s my snippet call:

            [!eForm? &formid=`appointmentForm` &to=`[email protected]` &tpl=`eAppointmentForm` &report=`eAppointmentReport` &thankyou=`eAppointmentThanks` &vericode=`1` &subject=`Request from [+firstname+] [+lastname+]`!]


            I noticed I had &department in there, even though my form doesn’t use it, so I removed that. Anything else you can think of that I should check?
              • 4310
              • 2,310 Posts
              Clutching at straws here, but maybe you need :
              value=""
                • 15197
                • 65 Posts
                Thanks for sticking with me on this one. It’s probably good to get that in there, but it didn’t fix the problem. sad
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  No, if the eform attribute isn’t in the field tags then eForm ignores it entirely. If you want the values "remembered", you have to have the eform="Field:type:0" attributes (attribute settings as appropriate).
                    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
                    • 15197
                    • 65 Posts
                    Thanks, Susan, but still no luck. The thing is, the values are being listed just fine in the Report email, just not in the subject line. I updated the form with your suggestion:

                    <input id="firstname" name="firstname" type="text"  value="" eform="First Name:string:1" />
                    <input id="lastname" name="lastname" type="text" value="" eform="Last Name:string:1" />
                    


                    And here’s the snippet call:

                    [!eForm? &formid=`appointmentForm` &to=`[email protected]` &subject=`Request from [+firstname+] [+lastname+]` &tpl=`eAppointmentForm` &report=`eAppointmentReport` &thankyou=`eAppointmentThanks` &vericode=`1` !]
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Sorry, I missed something in your original question; probably due to being up at 3 AM undecided
                        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