1

I have a Webform that does some calculations (javascript) based on user selections, which i would like to send along with the user-selectable fields to a user's email.

Is it possible to append these div's to the HTML email along with the fields?

  • Are you using the Webform module or are you creating the form in a custom module? – Jose Daniel Aug 17 '14 at 15:47
  • I am using the Webform module. – boomshanka Aug 20 '14 at 4:21
0

You could add a regular webform field to capture the calculation result, filling it via Javascript. Then you hide the field via CSS.

Storing a bunch of html has a security risk though.

0

You can create a custom module with the next hook:

function yourmodulename_webform_submission_presave($node, &$submission){ ... }

var $node contains the webform node on which this submission was made and submission contains the webform submission that is about to be saved to the database. So, that way you can get the values from submission and alter them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.