function webform_menu_email_load in Webform 7.3
Same name and namespace in other branches
- 6.3 webform.module \webform_menu_email_load()
- 7.4 webform.module \webform_menu_email_load()
Menu loader callback. Load a webform e-mail if the given eid is a valid.
File
- ./
webform.module, line 399 - This module provides a simple way to create forms and questionnaires.
Code
function webform_menu_email_load($eid, $nid) {
module_load_include('inc', 'webform', 'includes/webform.emails');
$node = node_load($nid);
$email = webform_email_load($eid, $nid);
if ($eid == 'new') {
if (isset($_GET['option']) && isset($_GET['email'])) {
$type = $_GET['option'];
if ($type == 'custom') {
$email['email'] = $_GET['email'];
}
elseif ($type == 'component' && isset($node->webform['components'][$_GET['email']])) {
$email['email'] = $_GET['email'];
}
}
}
return $email;
}