Buy Now
Sign in

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

squiffed , January 23 2014, 23:05
S
squiffed 15
January 23 2014, 23:05 #322762
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 http://greyhead.net/how-to-docs/chronoforms-v4-actions (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 64
January 24 2014, 11:36 #322791
Hi squiffed,

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

Bob

PS Sorry about the slow site, it's on the to-do list to find out what is happening.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
squiffed 15
January 24 2014, 20:17 #322841
Bob,

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,
Jim
M
Maxximum 7
February 05 2014, 11:50 #323774
Hi Bob,

I've tried the same thing as mentioned above.
I've put the code
<?php
$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?