Forums

Solved: Variable not being passed to e-mail template

abasel 20 May, 2013
I am using a multipage form.

On the last multipage I have some custom HTML that stores the following new field with data in the form:
$prices=array(100,180,225,320,375);
$form->data['cost']=$prices[$noofdays-1];
$form->data['noofdays']=$noofdays;


This code works fine on the actual screen but when I put the following in the e-mail template no values appear:
<?php if ($noofdays==1) { ?>
1 day comes to: ${cost}.
<?php } else { ?>
{noofdays} days comes to: ${cost}
<?php }?>


All that appears in the e-mail from the above code is

days comes to: $

abasel 20 May, 2013
Got it... the custom code that assigned the values was in one of my multipage blocks. I copied it to the "On Submit" block and it worked.
This topic is locked and no more replies can be posted.