-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (71 loc) · 3.11 KB
/
index.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
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Premium Multi-Step Form</title>
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<form id="multi-step-form">
<!-- Step 1 -->
<div class="form-step active">
<div class="step-header">Step 1 of 5</div>
<h2>Personal Information</h2>
<label for="name">Name:</label>
<input type="text" id="name" name="name" required minlength="2">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<div class="buttons">
<button type="button" class="next-step">Next</button>
</div>
</div>
<!-- Step 2 -->
<div class="form-step">
<div class="step-header">Step 2 of 5</div>
<h2>Preferences</h2>
<label><input type="checkbox" name="pref" value="Option 1"> Option 1</label>
<label><input type="checkbox" name="pref" value="Option 2"> Option 2</label>
<label><input type="checkbox" name="pref" value="Option 3"> Option 3</label>
<div class="buttons">
<button type="button" class="prev-step">Previous</button>
<button type="button" class="next-step">Next</button>
</div>
</div>
<!-- Step 3 -->
<div class="form-step">
<div class="step-header">Step 3 of 5</div>
<h2>Upload an Image</h2>
<label for="image">Choose an image:</label>
<input type="file" id="image" name="image" accept="image/*">
<div class="buttons">
<button type="button" class="prev-step">Previous</button>
<button type="button" class="next-step">Next</button>
</div>
</div>
<!-- Step 4 -->
<div class="form-step">
<div class="step-header">Step 4 of 5</div>
<h2>Comments</h2>
<label for="comments">Comments (max 200 characters):</label>
<textarea id="comments" name="comments" maxlength="200"></textarea>
<div class="buttons">
<button type="button" class="prev-step">Previous</button>
<button type="button" class="next-step">Next</button>
</div>
</div>
<!-- Step 5 -->
<div class="form-step">
<div class="step-header">Step 5 of 5</div>
<h2>Summary</h2>
<div id="summary"></div>
<div class="buttons">
<button type="button" class="prev-step">Previous</button>
<button type="submit">Submit</button>
</div>
</div>
</form>
<a href="https://github.com/MiladJoodi/Premium_Multi-Step_Form"><img src="https://github.blog/wp-content/uploads/2008/12/forkme_left_red_aa0000.png" style="position:absolute;top:0;left:0;" alt="Fork me on GitHub"></a>
<script src="script.js"></script>
</body>
</html>