We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25215
    • 32 Posts
    Apologies if this has been asked and solved elsewhere, but I can’t find any solution to this.

    I simply want to use a placeholder for the subject of an email sent via eform. So my snippet call would look something like

    [!eForm? &formid=`contact-form` &tpl=`contact-form` &report=`contact-email` &thankyou=`contact-thanks` &subject=`Enquiry from [+realname+]`!]


    Where realname is the input field name in my form. This doesn’t seem to work at all unless you swap [+realname+] for [+subject+] in which case it works great.

    However I don’t want the subject field used in the email subject, I want the name.

    Any help appreciated.

      • 33337
      • 3,975 Posts
      Are you using PHx on the site?
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 25215
        • 32 Posts
        Yes I am.
          • 33337
          • 3,975 Posts
          PHx is known to interfere with [+..+] in snippet calls.

          To resolve it, upgrade eform to 1.4.4.6 and use the ((...)) instead of [+...+] for your placeholders in the snippet call.

          Note that, above only applies to eform.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 25215
            • 32 Posts
            Many thanks for that zi, I got it working!

            I did notice one slight quirk of the snippet though. If you have a field called subject in your form chunk then this will override anything you’ve got placed in the &subject parameter of the snippet call. Not really what you’d expect.

            So I had to rename this to something else and it worked fine.

            Thanks again.
              • 12477
              • 5 Posts
              Quote from: zi at Feb 19, 2009, 12:41 PM

              PHx is known to interfere with [+..+] in snippet calls.

              To resolve it, upgrade eform to 1.4.4.6 and use the ((...)) instead of [+...+] for your placeholders in the snippet call.

              Note that, above only applies to eform.

              See zi, this is the stuff that either needs to be stickied or put in the documentation.... hahahaha... I have such a love hate relationship with modx.
                • 29201
                • 239 Posts
                Thank you!!!!! I spent 20 mins on this...

                Quote from: roan at Feb 19, 2009, 01:40 PM
                If you have a field called subject in your form chunk then this will override anything you've got placed in the &subject parameter of the snippet call. Not really what you'd expect.