On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • The ability to call eform with a dynamic subject line in the call via a placeholder is wonderful:
    [!eForm?&subject=`[+subject+]` ...


    I’d like to see the next tweak/rev support user-defined placeholders rather than the fixed "subject" placeholder. This would be handy for pages that use an ID that’s different than subject, or to avoid XHTML validation failures when you have multiple forms on a page using this technique.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
    • Perhaps I’m still too much in holiday mode but I don’t quite see where you are going with this.

      Out of the box you can use place holders that relate to any of the fields you have in your form (and any session vars that are made available to eForm via the &sessionVars parameter).

      How does this relate to multiple forms on a page and XHTML validation? As long as the form id is different you can set up forms with equal functionality without any XHTML validation problems I would think..

      Hmm,... just tried adding 2 forms to a page and ran into a different problem.. The posted form causes the non-posted form to have form validation errors. It should have been ignored! Seems I have broken something with the handling of the formid... embarrassed Will get back to you about that later....


      • If you want dynamic subjects on both of them, and you want to use IDs on the relevant form fields, they both have to be "id=subject" AFAIK.

        In other words you have to assign the name of "subject" to your eForm field that is to be used as your dynamic subject, since the option to do so is either 0 or 1. You can’t for instance use "contactSubject" and "jobSubject".
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • Quote from: rthrash at Jan 08, 2007, 04:45 AM

          In other words you have to assign the name of "subject" to your eForm field that is to be used as your dynamic subject, since the option to do so is either 0 or 1. You can’t for instance use "contactSubject" and "jobSubject".
          Not true (at least it shouldn’t be). You shoudl be able to use any form field as the dynamic subject. The confusion might be that normally, if you have a form field called "subject", then this will take precedence over the parameter &subject. However if you call your field jobSubject and you set &subject=`[+jobSubject+]` (and similarly in the second form) then this should work without a problem.

          The code that sets the subject first looks in the fields array. If it doesn’t find a value it will use the &subject parameter and pass this through formMerge() to replace any place holders and thus use the value in the jobSubject in this case.

          If you experience this not to work we’ve got a bug...
          • I don’t know what I was thinking. Must have missed a placeholder name in my previous iterations. Thanks and apologies issued! tongue
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • Sorry to revive a 7 year old thread, but this doesn't seem to be working for me (using Evo 1.0.12 + eForm 1.4.4.7). I'm trying to use a placeholder name [+contact-name+] that shows up in the report, but not when I include it in the &subject parameter in the eForm call. sad
              • Quote from: diatomin at Apr 05, 2014, 04:08 AM
                Sorry to revive a 7 year old thread, but this doesn't seem to be working for me (using Evo 1.0.12 + eForm 1.4.4.7). I'm trying to use a placeholder name [+contact-name+] that shows up in the report, but not when I include it in the &subject parameter in the eForm call. sad

                In case anyone needs this for Evo. Just warp your placeholder name with (( )) instead of [+ +].