Skip to content

Commit 8423540

Browse files
authored
Merge pull request #60 from KavyaBS123/master
modified contact form
2 parents 04fc1f2 + 5ec58b4 commit 8423540

File tree

3 files changed

+99
-4
lines changed

3 files changed

+99
-4
lines changed

index.html

+42-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h1><br>Want to <span>Share</span> or <span>Rent</span> <br>a cab.</h1>
4646
<img src="img/Car Website – [email protected]" alt="">
4747
</div>
4848
</div>
49-
<div class="form-container">
49+
<!-- <div class="form-container">
5050
<form action="anonimous.php" method="post">
5151
<div class="input-box">
5252
<span>From <span> MUJ Hostel</span> To</span>
@@ -62,7 +62,48 @@ <h1><br>Want to <span>Share</span> or <span>Rent</span> <br>a cab.</h1>
6262
</div>
6363
<input type="submit" name="submit" id="submit" class="btn">
6464
</form>
65+
</div> -->
66+
67+
<div class="booking-form">
68+
<div class="form-group">
69+
<label for="fullName">Full Name</label>
70+
<input type="text" id="fullName" placeholder="Your Name">
71+
</div>
72+
<div class="form-group">
73+
<label for="phone">Phone</label>
74+
<input type="tel" id="phone" placeholder="Telephone">
75+
</div>
76+
<div class="form-group">
77+
<label for="email">Email</label>
78+
<input type="email" id="email" placeholder="[email protected]">
79+
</div>
80+
<div class="form-group">
81+
<label for="city">City</label>
82+
<select id="city">
83+
<option>Select City</option>
84+
<!-- Add more options here -->
85+
</select>
86+
</div>
87+
<div class="form-group">
88+
<label for="vehicle">Vehicle</label>
89+
<select id="vehicle">
90+
<option>Select Vehicle</option>
91+
<!-- Add more options here -->
92+
</select>
93+
</div>
94+
<div class="form-group">
95+
<label for="pickupDate">Pickup Date</label>
96+
<input type="date" id="pickupDate">
97+
</div>
98+
<div class="form-group">
99+
<label for="dropoffDate">Drop-off Date</label>
100+
<input type="date" id="dropoffDate">
101+
</div>
65102
</div>
103+
<div class="form-group">
104+
<button id="bookNow">Book Now</button>
105+
</div>
106+
66107
</section>
67108
<!-- Ride-->
68109
<section class="ride" id="ride">

script.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ document
44
const testimonialsContainer = document.getElementById(
55
"testimonials-container"
66
);
7-
7+
document.getElementById('bookNow').addEventListener('click', function() {
8+
alert('Booking confirmed!');
9+
});
10+
811
const newTestimonials = [
912
{
1013
text: "I've used many cab services before, but this one is by far the best. Highly recommended!",

style.css

+53-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,59 @@ header {
160160
margin-right: 1rem;
161161
cursor: pointer;
162162
}
163+
.booking-form {
164+
background-color: #ffffff;
165+
padding: 20px;
166+
border-radius: 10px;
167+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
168+
display: grid;
169+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
170+
gap: 20px;
171+
width: 100%;
172+
}
163173

164-
.form-container form {
174+
.form-group {
175+
display: flex;
176+
flex-direction: column;
177+
}
178+
179+
.form-group label {
180+
margin-bottom: 5px;
181+
font-weight: bold;
182+
}
183+
184+
.form-group input,
185+
.form-group select {
186+
padding: 10px;
187+
border: 2px solid orangered;
188+
border-radius: 5px;
189+
font-size: 16px;
190+
}
191+
192+
.form-group input:focus,
193+
.form-group select:focus {
194+
outline: none;
195+
border-color: orangered;
196+
}
197+
198+
#bookNow {
199+
background-color: orangered;
200+
color: white;
201+
padding: 15px;
202+
border: none;
203+
border-radius: 5px;
204+
font-size: 18px;
205+
cursor: pointer;
206+
transition: background-color 0.3s;
207+
}
208+
209+
#bookNow:hover {
210+
background-color: orangered;
211+
transform: scale(1.1);
212+
213+
}
214+
215+
/* .form-container form {
165216
display: flex;
166217
flex-wrap: wrap;
167218
align-items: center;
@@ -172,7 +223,7 @@ header {
172223
background-color: rgb(238, 239, 241);
173224
padding: 19px;
174225
border-radius: 0.5rem;
175-
}
226+
} */
176227

177228
.input-box {
178229
flex: 1 1 7rem;

0 commit comments

Comments
 (0)