Hi Max & Co. !
Using CCV5 to list articles generated from Emails received, then a CCV5 'Edit Action' to load article into a CFV5 form for Editing / Emailing - all good.
Next, trying to get some DB data into that Email's 'Subject' & 'Body' before sending.
OnSubmit sequence :
OnSubmit > DB Read ( [Data9] = OK ) > Custom Code
Custom Code :
< ? php
$form->data['subject'] = "{Data9.site} | Gift Voucher";
$form->data['voucher'] = "{Data9.voucher} | Gift Voucher Number";
? >
Then > in OnSubmit 'Email' I use 'subject' from Custom Code in dynamic tab field 'subject' & in Email Body I use {voucher} from Custom Code but neither of these outputs values into delivered Email.
As you can see in Array below [subject] & [voucher] are displaying correct values from 'Custom Code' in Array.
------------------------------------------------
OnSubmit Array :
Array
(
[option] => com_chronoconnectivity5
[cont] => lists
[ccname] => voucher-requests
[act] => edit
[Itemid] => 1200
[gcb] => 501
[chronoform] => voucher-requests
[event] => submit
[regrequest] => Array
(
[introtext] => Blar, Blar [Your Name Please] Joe Bloggs
[Your Email Please] joe@home.com
[Phone Number (Optional)] 123456789
)
[emailaddress] => (Dynamic from form = OK)
[button5] => Submit
[Data9] => Array
(
[site] => www.mysite.com
[voucher] => 1234ABCD333
)
[subject] => www.mysite.com | Gift Voucher
[voucher] => 1234ABCD333 | Gift Voucher Number
)
---------------------------------------------------
Debug array :
[3] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully :
[1] => To: joe@home.com
[2] => Subject:www.mysite.com | Gift Voucher
[3] => From name:System
[4] => From email:noreply@system.noreply
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:noreply@system.noreply
[9] => Attachments:
[10] => Array
(
)
[11] => Body:
Hi ! Thanks for your 'Voucher' request. Please find our current 'Voucher Number' Below (This 'Voucher Number' will be valid for 24hr's).
Voucher : 1234ABCD333 | Gift Voucher Number
------------------
Debug shows 'Subject' & 'Body' contain the required data but if I actually send the Email I receive unprocessed values - eg: in 'Subject' I get : {Data9.site} | Gift Voucher & in 'Body' I get : {Data9.voucher} | Gift Voucher Number
Weird Ha - Must be syntax ? Can you advise please !!! - Cheers Paulzero
Using CCV5 to list articles generated from Emails received, then a CCV5 'Edit Action' to load article into a CFV5 form for Editing / Emailing - all good.
Next, trying to get some DB data into that Email's 'Subject' & 'Body' before sending.
OnSubmit sequence :
OnSubmit > DB Read ( [Data9] = OK ) > Custom Code
Custom Code :
< ? php
$form->data['subject'] = "{Data9.site} | Gift Voucher";
$form->data['voucher'] = "{Data9.voucher} | Gift Voucher Number";
? >
Then > in OnSubmit 'Email' I use 'subject' from Custom Code in dynamic tab field 'subject' & in Email Body I use {voucher} from Custom Code but neither of these outputs values into delivered Email.
As you can see in Array below [subject] & [voucher] are displaying correct values from 'Custom Code' in Array.
------------------------------------------------
OnSubmit Array :
Array
(
[option] => com_chronoconnectivity5
[cont] => lists
[ccname] => voucher-requests
[act] => edit
[Itemid] => 1200
[gcb] => 501
[chronoform] => voucher-requests
[event] => submit
[regrequest] => Array
(
[introtext] => Blar, Blar [Your Name Please] Joe Bloggs
[Your Email Please] joe@home.com
[Phone Number (Optional)] 123456789
)
[emailaddress] => (Dynamic from form = OK)
[button5] => Submit
[Data9] => Array
(
[site] => www.mysite.com
[voucher] => 1234ABCD333
)
[subject] => www.mysite.com | Gift Voucher
[voucher] => 1234ABCD333 | Gift Voucher Number
)
---------------------------------------------------
Debug array :
[3] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully :
[1] => To: joe@home.com
[2] => Subject:www.mysite.com | Gift Voucher
[3] => From name:System
[4] => From email:noreply@system.noreply
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:noreply@system.noreply
[9] => Attachments:
[10] => Array
(
)
[11] => Body:
Hi ! Thanks for your 'Voucher' request. Please find our current 'Voucher Number' Below (This 'Voucher Number' will be valid for 24hr's).
Voucher : 1234ABCD333 | Gift Voucher Number
------------------
Debug shows 'Subject' & 'Body' contain the required data but if I actually send the Email I receive unprocessed values - eg: in 'Subject' I get : {Data9.site} | Gift Voucher & in 'Body' I get : {Data9.voucher} | Gift Voucher Number
Weird Ha - Must be syntax ? Can you advise please !!! - Cheers Paulzero