-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.html
More file actions
156 lines (140 loc) · 5.93 KB
/
form.html
File metadata and controls
156 lines (140 loc) · 5.93 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ELITE</title>
<link rel="icon" type="image/png" href="image/Mask group in whit page .svg">
<!--Bootstrap css-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
<link rel="stylesheet" href="./assets/css/bootstrap.min.css">
<link rel="stylesheet" href="./assets/css/owl.carousel.min.css">
<link rel="stylesheet" href="./assets/css/owl.theme.default.min.css">
<!--CSS-->
<link rel="stylesheet" href="form_css/form.css">
</head>
<body>
<!--form content-->
<section class="form_course">
<div class="container py-5">
<div class="card shadow">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center mb-3">
<h5 class="mb-0">Enroll Course</h5>
<small><span id="stepIndicator">1</span>/2</small>
</div>
<div class="progress mb-4" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar" id="formProgress" style="width: 50%;"></div>
</div>
<form id="enrollForm">
<!-- Step 1 -->
<div class="row form-step active" data-step="1">
<div class="col-md-6 mb-3">
<label class="form-label">Student’s Full Name</label>
<input type="text" class="form-control" placeholder="Enter your name" required />
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Father’s Name</label>
<input type="text" class="form-control" placeholder="Enter your Father's name" required />
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Date of Birth</label>
<input type="date" class="form-control" required />
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Father’s Contact</label>
<input type="tel" class="form-control" placeholder="+1 (555) 000‑0000" required />
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Gender</label>
<select class="form-select" required>
<option selected disabled>Select your Gender</option>
<option>Male</option>
<option>Female</option>
<option>Other</option>
</select>
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Course Name</label>
<select class="form-select" required>
<option selected disabled>Select your course</option>
<option>HTML Basics</option>
<option>CSS Fundamentals</option>
<option>Bootstrap 5</option>
</select>
</div>
</div>
<!-- Step 2 -->
<div class="row form-step" data-step="2">
<div class="col-md-6 mb-3">
<label class="form-label">Email Address</label>
<input type="email" class="form-control" placeholder="Enter your email address" required />
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Country</label>
<select class="form-select" required>
<option selected disabled>Select your country</option>
<option>Bangladesh</option>
<option>United States</option>
<option>United Kingdom</option>
</select>
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Contact Number</label>
<input type="tel" class="form-control" placeholder="+1 (555) 000‑0000" required />
</div>
<div class="col-md-6 mb-3">
<label class="form-label">Current Address</label>
<input type="text" class="form-control" placeholder="Enter your address" required />
</div>
<div class="col-12 mb-3">
<label class="form-label">Message</label>
<textarea class="form-control" placeholder="Leave us a message..." rows="3"></textarea>
</div>
</div>
<!-- Buttons -->
<div class="button2">
<button type="button" class="fd" id="SubmitBtn">Submit</button>
</div>
</form>
<a href="payment_method.html">Just For Testing</a>
</div>
</div>
</div>
<script>
const steps = document.querySelectorAll('.form-step');
const SubmittBtn = document.getElementById('nextBtn');
const stepIndicator = document.getElementById('stepIndicator');
const formProgress = document.getElementById('formProgress');
let currentStep = 1;
function showStep(n) {
steps.forEach((s, i) => {
s.classList.toggle('active', i === n - 1);
});
stepIndicator.textContent = n;
formProgress.style.width = (n / steps.length) * 100 + '%';
prevBtn.disabled = n === 1;
nextBtn.textContent = n === steps.length ? 'Submit' : 'Next';
}
nextBtn.addEventListener('click', () => {
if (currentStep < steps.length) {
currentStep++;
showStep(currentStep);
} else {
document.getElementById('enrollForm').submit();
}
});
prevBtn.addEventListener('click', () => {
if (currentStep > 1) {
currentStep--;
showStep(currentStep);
}
});
</script>
</section>
<!--Bootstrap JS bundle-->
<script src="./assets/js/bootstrap.bundle.min.js"></script>
<!--JS-->
<script src="./assets/js/main.js"></script>
</body>
</html>