forked from BrianGilbert/signaturefield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
73 lines (51 loc) · 1.85 KB
/
README.txt
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-- SUMMARY --
SignatureField allows you to collect HTML5 canvas based signatures in webform,
cck and in your custom modules via fapi. It then displays the signature as a png file.
It achieves this using the Signature Pad jQuery plugin from:
http://thomasjbradley.ca/lab/signature-pad
-- REQUIREMENTS --
* Libraries API http://drupal.org/project/libraries
-- INSTALLATION --
* Download Signature Pad and extract contents to libraries/signature-pad
* Install and enable Libraries API module
* Install and enable SignatureField module
-- CONFIGURATION --
* Create a webform, content type or custom form with a signaturefield and
configure settings per field.
-- EXAMPLE CUSTOM FORM --
function signaturefield_menu() {
$items = array();
$items['test'] = array(
'title' => "test",
'page callback' => 'drupal_get_form',
'page arguments' => array('signaturefield_test_form'),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function signaturefield_test_form($form, &$form_state){
$form = array();
$form['test'] = array(
'#title' => 'Test Form',
'#type' => 'signaturefield',
'#color' => '#0f0',
);
$form['submit'] = array(
'#value' => 'Submit',
'#type' => 'submit',
);
if (!empty($form_state['signaturefield']['signature'])){
$form['test'] = array('#value' => theme('signaturefield_display', $form_state['signaturefield']['signature']));
}
return $form;
}
function signaturefield_test_form_submit($form_id, &$form_state){
$form_state['signaturefield']['signature'] = $form_state['input']['test'];
}
-- CONTACT --
Current maintainers:
* Brian Gilbert (realityloop) - http://drupal.org/user/139189
* Realityloop Pty Ltd
Helping plan, prepare, implement and deploy Drupal solutions tailored to your needs.
Visit http://www.realityloop.com for more information.