Static subject (in e-mail) shows up but not dynamic

squiffed 23 Jan, 2014
I've looked at a number of answers to similar problem in the forums here and tried all of them to best of my ability. So far no luck...

Basic problem is this:

I have a form for RMA so people can return their instruments to us. I want a copy sent to me and to the originator, and I want a unique subject line, reflecting the serial number of the instrument. So, for instance, it would say 'RMA for unit 123'.

The dynamic 'e-mail to' seems to work just fine. I have 3 fields where e-mail addresses are input and those are added to the e-mail 'To:' field along with a static e-mail address. So that's great.

The e-mail subject, however, only seems to show the static setting (e.g. 'RMA for unit') but doesn't show any of the dynamic input ('123'). I've triple checked the field names and used other field names (e.g. the e-mail addresses which work above) but get nothing. If there's no static subject (left blank) I get 'DEFAULT SUBJECT'.

I tried the php custom code trick linked to in several e-mails, but it doesn't seem to work. Not clear if it applies, since in looking at debug output I don't see 'subject' as a field.

UPDATE: Well I can get it to work with the version 4 custom action at (The connection is very slow and I'd given up on it being a valid link, but then it finally popped up.) So, I guess no need to answer. I'll go ahead and post in off-chance it saves somebody else some time.
GreyHead 24 Jan, 2014
Hi squiffed,

Please see this FAQ which tells you how to create a dynamic subject with the standard Email action.


PS Sorry about the slow site, it's on the to-do list to find out what is happening.
squiffed 24 Jan, 2014

I tried that, but it didn't work for me (as mentioned above). I may well have done something wrong, though I just cut and pasted your code then changed form name and field name to test. I didn't dig into it as this wasn't exactly 'mission critical'.

Using your v.4 custom action worked.

thanks for reply,
Maxximum 05 Feb, 2014
Hi Bob,

I've tried the same thing as mentioned above.
I've put the code
$form->data['subject'] = "een bericht van {$form->data['naam']} via de site";

'naam' is the senders name.
Then I put subject in de dynamic subject box, but there's no subject is comming at all.
Do i have to change something in de code? Like formname or somthing like that?
This topic is locked and no more replies can be posted.