Hi,
I have the following form:
<form>
action mail
dest@domain.com
usemailtemplate mailtpl
subject "Calculated value"
fieldset "Get 2 numbers"
select "number1" "0|1|2|3|4|5|6|7|8|9"
hidden "factor1" "=101"
select "number2" "0|1|2|3|4|5|6|7|8|9"
hidden "factor2" "=11"
submit "Send email"
</form>
I need to calculate
number1 * factor1 + number2 * factor2
and send the result via email.
I tried to perform the calculations by using the Const plugin, but without success:
- When I try to use the const fonctionality in the page with the form, I am not able to assign the result of the calculation to a form field, when I use the @@fieldname@@ in the computation string.
- When I try to use the const fonctionality in the template page for the email, it does not substitute the variable name defined in the const section with its value. %%result%% appears as %result% in the email. Am I using a wrong syntax or are the const and bureaucracy plugins incompatible?
Thanks in advance for any help.