forked from AdrianWii/designing-effective-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
129 lines (120 loc) · 6.19 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<script src="script.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" defer></script>
<title>Efektywne formularze</title>
</head>
<body>
<div class="container">
<h1>Uzupełnij formularz</h1>
<form id="form">
<div class="mb-3">
<label for="firstName" class="form-label">Imię</label>
<input type="text" class="form-control" id="firstName" placeholder="Wpisz imię" required>
</div>
<div class="mb-3">
<label for="lastName" class="form-label">Nazwisko</label>
<input type="text" class="form-control" id="lastName" placeholder="Wpisz nazwisko" required>
</div>
<div class="mb-3">
<label for="street" class="form-label">Ulica</label>
<input type="text" class="form-control" id="street" placeholder="Wpisz ulicę" required>
</div>
<div class="mb-3">
<label for="country" class="form-label">Kraj</label>
<select class="form-select" id="country" required>
<option value="">Wybierz kraj</option>
<!-- Options will be filled by JavaScript -->
</select>
</div>
<div class="row mb-3">
<label for="phoneNumber" class="form-label">Numer telefonu komórkowego</label>
<div class="input-group">
<select class="form-select" id="countryCode" aria-label="Wybierz numer kierunkowy">
<option selected>Wybierz...</option>
<option value="+48">+48 (Polska)</option>
<option value="+1">+1 (Stany Zjednoczone)</option>
<!-- Dodaj więcej opcji, jeśli jest to potrzebne -->
</select>
<input type="text" class="form-control" id="phoneNumber" placeholder="Wpisz numer komórkowy"
required>
</div>
</div>
<div class="mb-3">
<label for="city" class="form-label">Miasto</label>
<input type="text" class="form-control" id="city" placeholder="Wpisz miasto" required>
</div>
<div class="mb-3">
<label for="zipCode" class="form-label">Kod pocztowy</label>
<input type="text" class="form-control" id="zipCode" placeholder="Wpisz kod pocztowy" required>
</div>
<div class="mb-3">
<label for="shippingMethod" class="form-label">Rodzaj przesyłki</label>
<select class="form-select" id="shippingMethod" required>
<option value="">Wybierz rodzaj przesyłki</option>
<option value="DPD">DPD</option>
<option value="InPost">InPost</option>
</select>
</div>
<div class="mb-3">
<label for="paymentMethod" class="form-label">Rodzaj płatności</label>
<select class="form-select" id="paymentMethod" required>
<option value="">Wybierz rodzaj płatności</option>
<option value="karta">Karta</option>
<option value="blik">BLIK</option>
<option value="pośrednik">Pośrednik płatności</option>
</select>
</div>
<!-- Dodatkowe pola, np. dane do faktury -->
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="vatUE">
<label class="form-check-label" for="vatUE">VAT UE</label>
</div>
<div class="mb-3">
<label for="vatNumber" class="form-label">VAT Number</label>
<input type="text" class="form-control" id="vatNumber" aria-describedby="vatHelp">
<div id="vatHelp" class="form-text">Kod kraju państwa członkowskiego i seria cyfr unikalnych dla tego
podmiotu gospodarczego.</div>
</div>
<div class="mb-3">
<label for="invoiceData" class="form-label">Dane do faktury</label>
<textarea class="form-control" id="invoiceData" rows="3" placeholder="Wpisz dane do faktury"></textarea>
</div>
<button type="submit" class="btn btn-primary" data-bs-toggle="modal"
data-bs-target="#form-feedback-modal">submit</button>
</form>
</div>
<!-- Raport kliknięć -->
<div class="modal fade" id="form-feedback-modal" tabindex="-1" aria-labelledby="raportModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="raportModalLabel">Raport kliknięć</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Ilość kliknięć myszką: <span id="click-count">0</span></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</body>
</html>