-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappointment.ejs
126 lines (96 loc) · 5.21 KB
/
appointment.ejs
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
<%- include('header') %>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="choose-area pb_90">
<div class="container mt-4">
<div class="row">
<div class="col-12">
<div class="headline">
<h2>Appointment</h2>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-2"></div>
<div class="col-lg-6 col-md-8 login-box">
<div class="col-lg-12 login-form">
<div class="col-lg-12 login-form">
<form method="post" autocomplete="off" name="Appointment">
<div class="form-group">
<label class="form-control-label">NAME</label>
<input type="text" class="form-control" name="Name" required>
</div>
<div class="form-group">
<label class="form-control-label">DATE OF BIRTH</label><br><br>
<input type="date" placeholder="DD/MM/YYYY" name="DOB" required>
</div>
<div class="form-group">
<label class="form-control-label">MOBILE NUMBER</label>
<input type="tel" class="form-control" name="Mob" required>
</div>
<div class="form-group">
<label class="form-control-label">EMAIL</label>
<input type="email" class="form-control" name="Email" required>
</div>
<div class="form-group">
<label class="form-control-label">ADDRESS</label>
<textarea row="5" class="form-control xyz" name="Address" required></textarea>
</div>
<div class="form-group">
<label class="form-control-label">SELECT:</label>
<select class="form-control" name="Doctor">
<option>Allergists</option>
<option>Dermatologists</option>
<option>Ophthalmologists</option>
<option>Obstetrician/gynecologists</option>
<option>Cardiologists</option>
<option>Endocrinologists</option>
<option>Gastroenterologists</option>
<option>Nephrologists</option>
<option>Urologists</option>
<option>Pulmonologists</option>
<option>Neurologists</option>
<option>Psychiatrists</option>
<option>Others</option>
</select>
</div>
<div class="form-group">
<label class="form-control-label">ENTER YOUR PROBLEM IN BRIEF</label>
<textarea row="5" class="form-control xyz" name="Problem" required></textarea>
</div>
<div class="col-lg-12 mb-4">
<div class="col-lg-6 ">
<!-- Error Message -->
</div>
<div class="row justify-content-center">
<div class="col-lg-6">
<button type="submit" name="submit" class="btn btn-primary">GET AN APPOINTMENT</button>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="col-lg-3 col-md-2"></div>
</div>
</div>
</div>
</div>
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbxU06oBiODARW3eE8cDRqm9I7GBX9yeL2N6qxuSPcYzwsp0ydA5N6Y/exec'
const form = document.forms['Appointment']
form.addEventListener('submit', e => {
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => alert("We will contact you as soon as you get an appointment.."))
.catch(error => console.error('Error!', error.message))
})
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</body>
</html>
<%- include('footer') %>