<![CDATA[ [Solved] User-defined dynamic subject placeholders - My Forums]]> https://forums.modx.com/thread/?thread=46678 <![CDATA[Re: [Solved] User-defined dynamic subject placeholders]]> https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-531456 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 [+ +].

]]>
krasm_ Sep 13, 2015, 12:26 PM https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-531456
<![CDATA[Re: [Solved] User-defined dynamic subject placeholders]]> https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-494348 ]]> diatomin Apr 04, 2014, 11:08 PM https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-494348 <![CDATA[Re: User-defined dynamic subject placeholders]]> https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270791 ]]> rethrash Jan 08, 2007, 12:26 PM https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270791 <![CDATA[Re: User-defined dynamic subject placeholders]]> https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270790 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...]]>
TobyL Jan 07, 2007, 11:20 PM https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270790
<![CDATA[Re: User-defined dynamic subject placeholders]]> https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270789
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".]]>
rethrash Jan 07, 2007, 10:45 PM https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270789
<![CDATA[Re: User-defined dynamic subject placeholders]]> https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270788
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....


]]>
TobyL Jan 07, 2007, 07:48 PM https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270788
<![CDATA[ [Solved] User-defined dynamic subject placeholders]]> https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270787
[!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.]]>
rethrash Jan 07, 2007, 03:14 PM https://forums.modx.com/thread/46678/solved-user-defined-dynamic-subject-placeholders#dis-post-270787