-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (92 loc) · 3 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html>
<head>
<style>
body {font-family: Arial, Helvetica, sans-serif;}
* {box-sizing: border-box;}
input[type=text], select, textarea {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 16px;
resize: vertical;
}
input[type=submit] {
background-color: #04AA6D;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
button {
background-color: #04AA6D;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
.container {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
</style>
<script>
var group,stage,n_blocks,n_per_block,participant,session
window.localStorage.clear()
document.addEventListener('DOMContentLoaded', function() {
const formElem = document.querySelector("form");
formElem.addEventListener("submit", (e) => {
// on form submission, prevent default
e.preventDefault();
const formElem = document.querySelector("form");
const formData = new FormData(formElem);
console.log(formData)
window.localStorage.setItem('participant',formData.get("name"))
window.localStorage.setItem('group',formData.get("group"))
window.localStorage.setItem('session',formData.get("session"))
window.location.href='exp.html?stage=1'
});
});
</script>
</script>
</head>
<body>
<h3>User Details</h3>
<div>
<ul>
<li>
<a href="https://docs.google.com/forms/d/1AkRHCUP9GL_nvsJcrlS8THayi40L341KNqq6yIeHOMg/viewform"
class="button" target="_blank" rel="noopener">Consent and Assessment for Narration</a>
</li>
<li>
<a href="https://docs.google.com/forms/d/1zo8fL1lHaeaUA03HWuUxhtYK2dPOiBa6j5mtwljc6i0/viewform"
class="button" target="_blank" rel="noopener">Consent and Assessment for Meditation</a>
</li>
</ul>
</ul>
</div>
<div class="container">
<form>
<label for="group">Group</label>
<select id='group' name='group' value='N'>
<option value='N'>Narration</option>
<option value='M'>Meditation</option>
</select>
<label for="name">Participant</label>
<input type="text" id="name" name="name" placeholder="Your name..">
<label for="session">Session No</label>
<input type="text" id="session" name="session" placeholder="Session Number..">
<input type="submit" value="Proceed Next">
</form>
</div>
</body>
</html>