Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
103 lines (93 loc) Β· 3.56 KB
/
Copy pathindex.html
File metadata and controls
103 lines (93 loc) Β· 3.56 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Connect HTML Form to Google Sheets</title>
<meta name="description" content="A lightweight, responsive, and serverless HTML form that submits data directly to Google Sheets using Google Apps Script." />
<link rel="stylesheet" href="style.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
</head>
<body>
<main class="container">
<div class="card">
<header class="card-header">
<div class="badge">Serverless Form</div>
<h1>Get in Touch</h1>
<p>Send your message directly to our Google Sheets database.</p>
</header>
<form id="contactForm" name="contact-form" autocomplete="on" novalidate>
<!-- Honeypot field for spam bots -->
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off" />
<div class="form-group">
<label for="fullName">Full Name <span class="required">*</span></label>
<input
type="text"
id="fullName"
name="fullName"
placeholder="e.g. Md Munna Islam"
required
/>
<span class="error-message" id="nameError"></span>
</div>
<div class="form-grid">
<div class="form-group">
<label for="email">Email Address <span class="required">*</span></label>
<input
type="email"
id="email"
name="email"
placeholder="e.g. name@example.com"
required
/>
<span class="error-message" id="emailError"></span>
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input
type="tel"
id="phone"
name="phone"
placeholder="e.g. +8801889560141"
/>
</div>
</div>
<div class="form-group">
<label for="subject">Subject <span class="required">*</span></label>
<input
type="text"
id="subject"
name="subject"
placeholder="e.g. Project Inquiry / Collaboration"
required
/>
<span class="error-message" id="subjectError"></span>
</div>
<div class="form-group">
<label for="message">Your Message <span class="required">*</span></label>
<textarea
id="message"
name="message"
rows="4"
placeholder="Write your detailed message here..."
required
></textarea>
<span class="error-message" id="messageError"></span>
</div>
<button type="submit" id="submitBtn" class="btn-submit">
<span class="btn-text">Submit Message</span>
<span class="spinner" id="btnSpinner" aria-hidden="true"></span>
</button>
</form>
<!-- Toast Notification Alert -->
<div id="toastNotification" class="toast" role="alert" aria-live="polite"></div>
<footer class="card-footer">
<p>π 100% Free & Open-Source β’ Powered by <a href="https://github.com/msmunnabd" target="_blank" rel="noopener">Md Munna Islam</a></p>
</footer>
</div>
</main>
<script src="script.js"></script>
</body>
</html>