I have a simple webform where I want to do some calculations and include the results in the automated email to both the user. Do you do this in the email template (webform-mail.tpl.php)? I tried to assign a form value to a PHP variable and cannot.
I also tried to add a hidden field and assign the calculated result to it via 'additional processing', but once the form is submitted, the calculation cannot be added to a hidden field. It would work on a multipage form, but I'd like to keep this to one form.
Any suggestions?
Thanks, Lynn
Are you familiar with PHP? The best way would be to use hook_form_alter and add a custom #submit value and then add all your processing in that function.
Here's a useful piece about adding additional processing to webform forms: http://www.drupalcoder.com/blog/additional-processing-in-drupals-webform-3-m...
Regards, Todd
On 17 Jun 2011, at 15:15, Lynn Stott (Stott Design) wrote:
I have a simple webform where I want to do some calculations and include the results in the automated email to both the user. Do you do this in the email template (webform-mail.tpl.php)? I tried to assign a form value to a PHP variable and cannot.
I also tried to add a hidden field and assign the calculated result to it via 'additional processing', but once the form is submitted, the calculation cannot be added to a hidden field. It would work on a multipage form, but I'd like to keep this to one form.
Any suggestions?
Thanks, Lynn
-- [ Drupal support list | http://lists.drupal.org/ ]