Hello all,
I have been browsing this wonderful helpful forum for a few days now. A client whom uses ChronoForms on his website wants to receive the forms with a number in the email and in the email subject.
I have chosen to use the cf_id that ChronoForms generates as the integer to become a serial number. Important to know that cf_id is not a field in the form itself. I know how to get that in a subject line. This is the cf_id generated by CF. Just a bit different.
Partially I have succeeded based on answers found in the forum.
1. Getting the cf_id to show up in the email template is done with the help of:
That part is working.
2. Now the administrator of the site wants that same cf_id to show up in the subject of the email. I have found partially how I can get the solution working, but no matter what I do, the cf_id is not showing in the subject.
The code I am using as a basis is derived from this topic here: http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=16006&p=41295&hilit=subject+cd+id#p41295 :
But $id is not working. I have tried numerous alternatives, it simply shows "some text" as subject, but is skipping the cf_id. So most of it is working, it is in the OnSubmit Before Email code, that all seems to be ok.
If there is anyone out there who could help me with that last part, get the cf_id show up in the subject. I am close, but not yet there.
Any help is appreciated.
Hope to hear from you soon.
With best regards,
Piet Nutbey
I have been browsing this wonderful helpful forum for a few days now. A client whom uses ChronoForms on his website wants to receive the forms with a number in the email and in the email subject.
I have chosen to use the cf_id that ChronoForms generates as the integer to become a serial number. Important to know that cf_id is not a field in the form itself. I know how to get that in a subject line. This is the cf_id generated by CF. Just a bit different.
Partially I have succeeded based on answers found in the forum.
1. Getting the cf_id to show up in the email template is done with the help of:
<?php echo "Number: ".$MyForm->tablerow["jos_chronoforms_nlr_onlinejudgeregistration"]->cf_id;?>
That part is working.
2. Now the administrator of the site wants that same cf_id to show up in the subject of the email. I have found partially how I can get the solution working, but no matter what I do, the cf_id is not showing in the subject.
The code I am using as a basis is derived from this topic here: http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=16006&p=41295&hilit=subject+cd+id#p41295 :
<?php
$id = $MyForm->tablerow["jos_chronoforms_nlr_onlinejudgeregistration"]->cf_id;
$subject = 'some text '.$id;
JRequest::setVar('subject', $subject);
?>
But $id is not working. I have tried numerous alternatives, it simply shows "some text" as subject, but is skipping the cf_id. So most of it is working, it is in the OnSubmit Before Email code, that all seems to be ok.
If there is anyone out there who could help me with that last part, get the cf_id show up in the subject. I am close, but not yet there.
Any help is appreciated.
Hope to hear from you soon.
With best regards,
Piet Nutbey