forked from anuragverma108/SwapReads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontactus1.html
70 lines (56 loc) · 3.7 KB
/
contactus1.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us Form</title>
</head>
<body style="background-color: #fdd7db; font-family: Arial, sans-serif; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh;">
<!-- Contact Form Container -->
<div style="display: flex; align-items: center; background-color: white; padding: 20px; border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); width: 60%; max-width: 800px;">
<!-- Form Section -->
<form id="contactForm" style="flex: 1; margin-right: 20px;">
<h2 style="color: #333; margin-bottom: 20px;">Contact Us</h2>
<label for="name" style="font-weight: bold; color: #333;">Name</label><br>
<input type="text" id="name" name="name" placeholder="Your Name" required style="width: 100%; padding: 10px; margin: 10px 0 20px; border: 1px solid #ccc; border-radius: 5px;">
<label for="email" style="font-weight: bold; color: #333;">Email</label><br>
<input type="email" id="email" name="email" placeholder="Your Email" required style="width: 100%; padding: 10px; margin: 10px 0 20px; border: 1px solid #ccc; border-radius: 5px;">
<label for="subject" style="font-weight: bold; color: #333;">Subject</label><br>
<select id="subject" name="subject" required style="width: 100%; padding: 10px; margin: 10px 0 20px; border: 1px solid #ccc; border-radius: 5px;">
<option value="" disabled selected>Select a subject</option>
<option value="general">General Inquiry</option>
<option value="support">Support Request</option>
<option value="feedback">Feedback</option>
<option value="collaboration">Collaboration</option>
<option value="other">Other</option>
</select>
<label for="message" style="font-weight: bold; color: #333;">Message</label><br>
<textarea id="message" name="message" placeholder="Your Message" required style="width: 100%; padding: 10px; margin: 10px 0 20px; border: 1px solid #ccc; border-radius: 5px;" rows="5"></textarea>
<button type="submit" style="background-color: #d985b9; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px;">Send Message</button>
</form>
</div>
<!-- Confirmation Message -->
<div id="confirmationMessage" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #d985b9; color: white; padding: 20px; border-radius: 5px; text-align: center; box-shadow: 0 4px 8px rgba(0,0,0,0.1);">
Thank you for your message! We'll get back to you soon.
</div>
<script>
document.getElementById('contactForm').addEventListener('submit', function(e) {
e.preventDefault();
// Perform form validation
if (this.checkValidity()) {
// Show confirmation message
document.getElementById('confirmationMessage').style.display = 'block';
// Hide confirmation message after 3 seconds
setTimeout(function() {
document.getElementById('confirmationMessage').style.display = 'none';
}, 3000);
// Reset form
this.reset();
} else {
// If the form is invalid, trigger the browser's default validation UI
this.reportValidity();
}
});
</script>
</body>
</html>