-
Notifications
You must be signed in to change notification settings - Fork 15
/
form-cc-example-m3.html
192 lines (174 loc) · 8.68 KB
/
form-cc-example-m3.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Ido Green | greenido.wordpress.com | @greenido">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#db5945">
<title>Auto Complete Attribute Example</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/css/materialize.min.css">
<style>
label.col-lg-2.control-label {
padding-top: 1em;
}
.col.s10 {
padding-left: 2em;
}
</style>
<body>
<div class="container">
<div class="row jumbotron">
<h3>Auto Complete Example</h3>
<button class="btn btn-warning" type="button" data-toggle="collapse"
data-target="#details" aria-expanded="false" aria-controls="details">?</button>
<div class="collapse" id="details">
<div class="col-md-11 col-xs-11">
<h4>Autofill in action</h4>
To try this example:
<ol>
<li>
Open it in Chrome (version 42+) and start filling the fields.
</li>
<li>
Chrome will suggest you 'auto fill' data from what it got so far.
</li>
<li>
For extra points, open Chrome DevTools and checkout the attributes we used on each field.
</li>
<li>
You can also try to click on the 'Checkout' button at the bottom of the form and see the validation in action.
</li>
</ol>
</div>
</div>
</div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#contact-sec" aria-controls="home" role="tab" data-toggle="tab">1) Contact</a>
</li>
<li role="presentation">
<a href="#shipping-sec" aria-controls="profile" role="tab" data-toggle="tab">2) Address</a>
</li>
<li role="presentation">
<a href="#payment-sec" aria-controls="messages" role="tab" data-toggle="tab">3) Payment</a>
</li>
</ul>
<div role="main">
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="contact-sec">
<form method="post" id="usrForm" class="form-horizontal">
<div id="contact-sec" role="tabpanel" class="tab-pane fade in active">
<div class="form-group">
<label for="frmNameA" class="col-lg-2 control-label">Name</label>
<div class="col-lg-10">
<input name="name" id="frmNameA" class="form-control validate" placeholder="Full name" required autocomplete="name"></div>
</div>
<div class="form-group">
<label for="frmEmailA" class="col-lg-2 control-label">Email</label>
<div class="col-lg-10">
<input type="email" name="email" class="form-control validate" id="frmEmailA" placeholder="[email protected]" required autocomplete="email"></div>
</div>
<div class="form-group">
<label for="frmEmailC" class="col-lg-2 control-label">Confirm Email</label>
<div class="col-lg-10">
<input type="email" name="emailC" class="form-control validate" id="frmEmailC" placeholder="[email protected]" required autocomplete="email"></div>
</div>
<div class="form-group">
<label for="frmPhoneNumA" class="col-lg-2 control-label">Phone</label>
<div class="col-lg-10">
<input type="tel" name="phone" id="frmPhoneNumA" class="form-control validate" placeholder="+1-650-450-1212" required autocomplete="tel"></div>
</div>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="shipping-sec">
<form class="col s12">
<div class="form-group">
<label for="frmAddressS" class="active col-lg-2 control-label">Address</label>
<div class="col-lg-10">
<input name="ship-address" class="form-control validate" required id="frmAddressS" autocomplete="shipping street-address"></div>
</div>
<div class="form-group">
<label for="frmCityS" class="active col-lg-2 control-label">City</label>
<div class="col-lg-10">
<input name="ship-city" class="form-control validate" required id="frmCityS" placeholder="New York" autocomplete="shipping address-level2"></div>
</div>
<div class="form-group">
<label for="frmStateS" class="active col-lg-2 control-label">State</label>
<div class="col-lg-10">
<input name="ship-state" class="form-control validate" required id="frmStateS" placeholder="NY" autocomplete="shipping address-level3"></div>
</div>
<div class="form-group">
<label for="frmZipS" class="active col-lg-2 control-label">Zip</label>
<div class="col-lg-10">
<input name="ship-zip" class="form-control validate" required id="frmZipS" placeholder="10011" autocomplete="shipping postal-code"></div>
</div>
<div class="form-group">
<label for="frmCountryS" class="active col-lg-2 control-label">Country</label>
<div class="col-lg-10">
<input name="ship-country" class="form-control validate" required id="frmCountryS" placeholder="USA" autocomplete="shipping country"></div>
</div>
<div class="row">
<div class="col s10">
<input type="checkbox" class="filled-in" name="billAndShip" id="cbBillAndShip">
<label for="cbBillAndShip">Bill to this address</label>
</div>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="payment-sec">
<form class="col s12">
<p> <i class="large mdi-action-add-shopping-cart"></i>
Do <b>NOT</b>
provide real credit card information in this field.
</p>
<div class="form-group">
<label for="frmNameCC" class="col-lg-2 control-label">Name on card</label>
<div class="col-lg-10">
<input name="ccname" id="frmNameCC" class="form-control" required placeholder="Full Name" autocomplete="cc-name"></div>
</div>
<div class="form-group">
<label for="frmCCNum" class="col-lg-2 control-label">Card Number</label>
<div class="col-lg-10">
<input name="cardnumber" id="frmCCNum" class="form-control" required autocomplete="cc-number"></div>
</div>
<div class="form-group">
<label for="frmCCCVC" class="col-lg-2 control-label">CVC</label>
<div class="col-lg-10">
<input name="cvc" id="frmCCCVC" class="form-control" required autocomplete="cc-csc"></div>
</div>
<div class="form-group">
<label for="frmCCExp" class="col-lg-2 control-label">Expiry</label>
<div class="col-lg-10">
<input name="cc-exp" id="frmCCExp" class="form-control" required placeholder="MM-YYYY" autocomplete="cc-exp"></div>
</div>
<div class="form-group">
<div class="col-lg-12">
<button class="btn btn-default">Cancel</button>
<button type="submit" id="butCheckout" class="btn btn-success">Check Out</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Compiled and minified JavaScript -->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/js/materialize.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>
<!-- GA -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-53348325-1', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>
</body>
</html>