Forums

Calculated Data in Email Template

jlcarpenter 18 Feb, 2010
I have created a survey and need to perform calculations on the data before sending the email and submitting it to the database. I have performed the calculations in the onSubmit before email box but can not figure out how to get my calculated values into the email and later into the database.
GreyHead 18 Feb, 2010
HI jlcarpenter,

Add the values to the results array like this
JRequest::setVar('var_name', $var_value);
Then you can use {var_name} in the email template and save to a 'var_name' column in the database table.

Bob
This topic is locked and no more replies can be posted.