-
Notifications
You must be signed in to change notification settings - Fork 0
/
peerCounseling.html
162 lines (142 loc) · 5.64 KB
/
peerCounseling.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-166240419-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-166240419-1');
</script>
<title>Peer Counseling | FindHope</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="apple-touch-icon" sizes="180x180" href="./Logo/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="./Logo/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./Logo/favicon-16x16.png" />
<link rel="manifest" href="./Logo/site.webmanifest" />
</head>
<body>
<!-- Start Contact Section -->
<div class="w3-container w3-light-grey w3-padding-32 w3-padding-large" id="contact">
<div class="w3-content" style="max-width: 600px;">
<h4 class="w3-center"><b>Peer Counseling</b></h4>
<script type="text/javascript">
var submitted = false;
window.onload = function () {
document.getElementById('myForm').reset();
}
</script>
<iframe name="hidden_iframe" id="hidden_iframe" style="display: none;"
onload="if(submitted) {window.location=`./redirect.html`;}"></iframe>
<!-- Update the Google forms URL in action-->
<form id="myForm"
action="https://docs.google.com/forms/u/5/d/e/1FAIpQLScLp0GxKSMF9I9b2rhlU-BCBmGAm9QVfcsiBA-fChOk19N5_w/formResponse"
method="post" target="hidden_iframe" onsubmit="return validateForm(); ">
<div class="w3-section">
<label>Name</label> <br>
<label>(Provide nickname if you wish to be anonymous)</label>
<input class="w3-input w3-border" type="text" placeholder="Name" id="name" required name="entry.455918560" />
</div>
<div class="w3-section">
<label>Email</label>
<input class="w3-input w3-border" type="text" placeholder="Email" id="email" required
name="entry.2020669080" />
</div>
<div class="w3-section">
<label>Whatsapp Number</label> <br>
<label>(Therapy is done over whatsapp and your number is perfectly safe)</label>
<input class="w3-input w3-border" f type="text" placeholder="Phone" id="phone" required
name="entry.1690252233" />
</div>
<!-- <div class="w3-section">
<label>Wellness Score</label>
<a href="./mentalWellnessTest.html" style="text-decoration: none; color: #007991;">(check your score)</a>
<input class="w3-input w3-border" type="text" placeholder="Wellness Score" id="score" required
name="entry.2130726129" />
</div> -->
<div class="w3-section">
<label>Preferred Language</label>
<p>
<input class="w3-radio" type="radio" name="entry.1628414300" value="English" checked>
<label>English</label></p>
<p>
<input class="w3-radio" type="radio" name="entry.1628414300" value="Hindi">
<label>Hindi</label></p>
<p>
<input class="w3-radio" type="radio" name="entry.1628414300" value="Telugu">
<label>Telugu</label></p>
</div>
<div class="w3-section">
<label>Describe your situation</label>
<input class="w3-input w3-border" type="text" placeholder="" id="message" name="entry.788657994" />
</div>
<div class="w3-section">
<button class="w3-button w3-block w3-black w3-margin-bottom" type="submit">
SEND
</button>
</div>
</form>
</div>
</div>
<script type="text/javascript">
function validateName() {
var name = document.getElementById("name").value;
if (name.length == 0) {
alert("Name can't be blank");
return false;
}
return true;
}
function validatePhone() {
var phone = document.getElementById("phone").value;
if (phone.length == 0) {
alert("Phone number can't be blank"); //Validation Message
return false;
}
if (!phone.match(/^[0]?[6789]\d{9}$/)) {
alert("Please enter a correct phone number"); //Validation Message
return false;
}
return true;
}
function validateEmail() {
var mail = document.getElementById("email").value;
var email=mail.toLowerCase();
if (email.length == 0) {
alert("Email can't be blank"); //Validation Message
return false;
}
if (!email.match(/^[A-Za-z\._\-[0-9]*[@][A-Za-z]*[\.][a-z]{2,4}$/)) {
alert("Please enter a correct email address"); //Validation Message
return false;
}
return true;
}
// function validateWellnessScore() {
// var score = document.getElementById("score").value;
// if (!(score >= 0 && score <= 100)) {
// alert("The wellness score must be in range 0-100");
// return false;
// }
// return true;
// }
function validateForm() {
if (!validateName() || !validatePhone() || !validateEmail()) {
alert("Form not submitted"); //Validation Message
return false;
} else {
submitted = true;
return true;
}
}
</script>
<!-- End Contact Section -->
</body>
</html>