-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms-lecture-POST.html
More file actions
80 lines (68 loc) · 2.08 KB
/
forms-lecture-POST.html
File metadata and controls
80 lines (68 loc) · 2.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Forms Lecture</title>
</head>
<body> <!-- POST METHOD SENDS YOUR DATA TO ANOTHER LOCATION -->
<h1>Register for Website</h1>
<form method="POST" action="https://request-inspector.glitch.me/"> <!-- the action will go to another page in POST -->
<fieldset>
<label for="username">
<span>Username</span>
<input type="text" name="username" placeholder="Username" required> <!-- adding required forces user to add an input -->
</label>
<br>
<label for="password">
<span>Password</span>
<input type="password" name="password" placeholder="Password" required>
</label> <!-- ** WRAP LABELS AROUND INPUTS ** -->
</fieldset>
<fieldset>
<legend>What kind of pizza do you like?</legend>
<section>
<label>
<input type="checkbox" name="pizza_toppings" value="pepperoni" >
<span>Pepperoni</span>
</label>
<br>
<label>
<input type="checkbox" name="pizza_toppings" value="cheese" disabled> <!-- removes ability to interact -->
<span>Cheese</span>
</label>
<br>
<label>
<input type="checkbox" name="pizza_toppings" value="hawaiian">
<span>Hawaiian</span>
</label>
</section>
</fieldset>
<br>
<h2>What is your role?</h2>
<label>
<input type="radio" name="role" value="designer" required> <!-- required makes this a must answer for radio checkboxes only -->
<span>Designer</span>
</label>
<br>
<label>
<input type="radio" name="role" value="developer">
<span>Developer</span>
</label>
<br>
<label>
<input type="radio" name="role" value="project_manager">
<span>Project Manager</span>
</label>
</section>
<h2>Favorite Wing Joint</h2>
<select name="fav_wing_joint">
<option value="bw2">Buffalo Wild Wings</option>
<option value="daddy">Wing Daddy's</option>
<option value="stop">Wing Stop</option>
<option value="plucky">Pluckers</option>
<option value="navy">Anchor Bar</option>
</select>
<button>Go</button>
</form>
</body>
</html>