-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
74 lines (55 loc) · 2.33 KB
/
index.html
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
74
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example form capture on submit with js</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700,900" rel="stylesheet">
<link rel="stylesheet" href="vendor/mdl/material.css">
<link rel="stylesheet" href="example.css">
<script src="vendor/mdl/material.js"></script>
<script src="vendor/html2canvas.min.js"></script>
</head>
<body>
<div class="editor-container">
<div class="heading">
<h1>Example form capture on submit with js</h1>
<p>When you press "send" button a screenshot of the form will be taken and added to the submitted data.</p>
</div>
</div>
<div class="output-container">
<div id="output">
<form id="the-form" action="#">
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input" type="text" id="name">
<label class="mdl-textfield__label" for="name">Your name</label>
</div>
<div></div>
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input" type="text" id="email">
<label class="mdl-textfield__label" for="email">Email</label>
</div>
<div></div>
<div class="mdl-textfield mdl-js-textfield">
<textarea class="mdl-textfield__input" type="text" rows="10" id="message"></textarea>
<label class="mdl-textfield__label" for="message">Drop some lines</label>
</div>
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-1">
<span class="mdl-switch__label">Send me a copy</span>
<input type="checkbox" id="switch-1" class="mdl-switch__input" checked>
</label>
<br>
<br>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
Send (and take a screenshot)
</button>
<input type="hidden" class="screenshot">
</form>
<div class="result">
<p><strong>Captured form:</strong></p>
<div class="inner-content"></div>
</div>
</div>
</div>
<script src="example.js"></script>
</body>
</html>