Closed (won't fix)
Project:
Webform
Version:
6.x-3.8
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2011 at 02:27 UTC
Updated:
8 Mar 2011 at 19:07 UTC
Hi,
It would be useful for me (and maybe others) to have optional PHP evaluation in webform email templates. I'd like to create a URL with a hash of an email value tagged on the end, for instance (I do not want to use sessions to store such data).
This is what I inserted at line 186 in webform.submissions.inc:
// PHP in the template?
if(strpos($email['message'], '<?php') !== FALSE){
$email['message'] = drupal_eval($email['message']);
}
Comments
Comment #1
joehudson commentedon the subject of email templates, it would also be handy to have direct access to the sid, not just the submission url.
so added:
$replacements['safe']['%sid'] = ($submission?$submission->sid:'');in webform_filter_values()
Comment #2
quicksketchI won't be adding PHP evaluation to any end-user interface. Use theming.