forked from davidsonjames/drupal-7-multistep-form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer_survey.module
50 lines (40 loc) · 1.28 KB
/
customer_survey.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
module_load_include('inc', 'customer_survey', 'includes/customer_survey.navigation');
module_load_include('inc', 'customer_survey', 'includes/customer_survey.validate');
module_load_include('inc', 'customer_survey', 'includes/customer_survey.submit');
/**
* Implements hook_menu().
*/
function customer_survey_menu() {
$items = array();
$items['customer-survey'] = array(
'title' => 'Customer Survey',
'page callback' => 'drupal_get_form',
'page arguments' => array('customer_survey_form'),
'access arguments' => array('access content'),
'file' => 'includes/customer_survey.form.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['complete-page'] = array(
'title' => 'Survey Complete',
'page callback' => 'customer_survey_complete',
'page arguments' => array(),
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
/*
* Implements hook_mail().
*/
function customer_survey_mail($key, &$message, $params) {
if (isset($params['subject'])) {
$message['subject'] = $params['subject'];
}
if (isset($params['body'])) {
$message['body'][] = $params['body'];
}
if (isset($params['headers']) && is_array($params['headers'])) {
$message['headers'] += $params['headers'];
}
}