-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBS4 inputs.html
172 lines (160 loc) · 6.55 KB
/
BS4 inputs.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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container">
<h2>Form control: input</h2>
<p>The form below contains two input elements; one of type text and one of type password:</p>
<form action="/action_page.php">
<div class="form-group">
<label for="usr">Name:</label>
<input type="text" class="form-control form-control-md" id="usr" name="username">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control form-control-lg form-control-plaintext" id="pwd" name="password">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
<h2>Form control: textarea</h2>
<p>The form below contains a textarea for comments:</p>
<form action="/action_page.php">
<div class="form-group">
<label for="comment">Comment:</label>
<textarea class="form-control" rows="5" id="comment" name="text"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
<h2>Form control: checkbox</h2>
<p>The form below contains three checkboxes. The first option is checked by default, and the last option is disabled:</p>
<form action="/action_page.php">
<div class="form-check">
<label class="form-check-label" for="check1">
<input type="checkbox" class="form-check-input" id="check1" name="option1" value="something" checked>Option 1
</label>
</div>
<div class="form-check">
<label class="form-check-label" for="check2">
<input type="checkbox" class="form-check-input" id="check2" name="option2" value="something">Option 2
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" disabled>Option 3
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
<h2>Form control: inline checkbox</h2>
<p>The form below contains three inline checkboxes:</p>
<form action="/action_page.php">
<div class="form-check-inline">
<label class="form-check-label" for="check1">
<input type="checkbox" class="form-check-input" id="check1" name="vehicle1" value="something" checked>Option 1
</label>
</div>
<div class="form-check-inline">
<label class="form-check-label" for="check2">
<input type="checkbox" class="form-check-input" id="check2" name="vehicle2" value="something">Option 2
</label>
</div>
<div class="form-check-inline">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" disabled>Option 3
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
<h2>Form control: radio buttons</h2>
<p>The form below contains three radio buttons. The first option is checked by default, and the last option is disabled:</p>
<form action="/action_page.php">
<div class="form-check">
<label class="form-check-label" for="radio1">
<input type="radio" class="form-check-input" id="radio1" name="optradio" value="option1" checked>Option 1
</label>
</div>
<div class="form-check">
<label class="form-check-label" for="radio2">
<input type="radio" class="form-check-input" id="radio2" name="optradio" value="option2">Option 2
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="radio" class="form-check-input" disabled>Option 3
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
<h2>Form control: inline radio buttons</h2>
<p>The form below contains three inline radio buttons. The first option is checked by default, and the last option is disabled:</p>
<form action="/action_page.php">
<div class="form-check-inline">
<label class="form-check-label" for="radio1">
<input type="radio" class="form-check-input" id="radio1" name="optradio" value="option1" checked>Option 1
</label>
</div>
<div class="form-check-inline">
<label class="form-check-label" for="radio2">
<input type="radio" class="form-check-input" id="radio2" name="optradio" value="option2">Option 2
</label>
</div>
<div class="form-check-inline">
<label class="form-check-label">
<input type="radio" class="form-check-input" disabled>Option 3
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
<h2>Form control: select</h2>
<p>The form below contains two dropdown menus (select lists):</p>
<form action="/action_page.php">
<div class="form-group">
<label for="sel1">Select list (select one):</label>
<select class="form-control form-control-sm" id="sel1" name="sellist1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<br>
<label for="sel2">Mutiple select list (hold shift to select more than one):</label>
<select multiple class="form-control" id="sel2" name="sellist2">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
<h2>Form Control Range and File</h2>
<p>Add the .form-control-range class to input type"range" or .form-control-file to input type"file" to style a range control or a file field with full-width:</p>
<form action="/action_page.php">
<div class="form-group">
<input type="range" class="form-control-range" name="range">
</div>
<div class="form-group">
<input type="file" class="form-control-file border" name="file">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<br>
</div>
</body>
</html>