-
Notifications
You must be signed in to change notification settings - Fork 95
/
index.html
264 lines (233 loc) · 9.68 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
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!DOCTYPE html>
<!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8"/>
<title>jq-idealforms</title>
<!--[if lt IE 9]>
<script src="js/lib/html5shiv.js"></script>
<![endif]-->
<link href="css/1140.css" rel="stylesheet"/>
<link href="css/normalize.css" rel="stylesheet"/>
<link href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" rel="stylesheet"/>
<link href="css/jquery.idealforms.min.css" rel="stylesheet" media="screen"/>
<link href="css/styles.css" rel="stylesheet" media="all"/>
</head>
<body>
<header>
<div class="container clearfix">
<div class="row">
<div class="twelvecol last">
<h1 id="title"><img src="img/logo.png"/></h1>
<a href="https://github.com/elclanrs/jq-idealforms/raw/master/zip/jquery.idealforms.zip" id="download">Download</a>
<span id="calltoaction">Get the latest version!</span>
</div>
</div>
</div>
</header>
<div id="main">
<div class="container clearfix">
<div class="row">
<div class="fourcol content">
<h1>Ideal Forms</h1>
<p>Ideal Forms is the ultimate framework for building and validating responsive HTML5 forms.</p>
<h2>Features:</h2>
<ul>
<li>Fully responsive</li>
<li>Keyboard support</li>
<li>Customizable input types <code>select</code>, <code>radio</code>, <code>checkbox</code> and <code>file</code></li>
<li>Custom datepicker using jQuery UI (with fallback)</li>
<li>"On the spot" validation</li>
<li>Localization</li>
<!--<li>HTML5 <code>placeholder</code> polyfill</li>-->
</ul>
<h2>Support:</h2>
<ul>
<li><strong>Browsers: </strong>IE8+, Webkit, Firefox, Opera, iOS5+, Android 4.0+</li>
<li><strong>jQuery: </strong>1.7+, UI 1.8+</li>
<li><strong>License: </strong>GPL or MIT</li>
</ul>
<a href="https://github.com/elclanrs/jq-idealforms">Ideal Forms at Github » </a>
<form id="donate" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Ideal Forms">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
<div class="eightcol last">
<!-- Begin Form -->
<form id="my-form">
<section name="Step 1">
<div>
<h2>Essential:</h2>
<p>What? Custom file inputs? Oh yeah!</p>
</div>
<div><label>Username:</label><input id="username" name="username" type="text"/></div>
<div><label>Password:</label><input id="pass" name="password" type="password"/></div>
<div><label>E-Mail:</label><input id="email" name="email" data-ideal="required email" type="email"/></div>
<div><label>Date:</label><input name="date" class="datepicker" data-ideal="date" type="text" placeholder="mm/dd/yyyy"/></div>
<div><label>Image:</label><input id="file" name="file" multiple type="file"/></div>
<div><label>Website:</label><input name="website" data-ideal="url" type="text"/></div>
</section>
<section name="Step 2">
<div>
<h2>Options:</h2>
<p>Wow, nice radios and checkboxes!</p>
</div>
<div id="languages">
<label>Languages:</label>
<label><input type="checkbox" name="langs[]" value="English"/>English</label>
<label><input type="checkbox" name="langs[]" value="Chinese"/>Chinese</label>
<label><input type="checkbox" name="langs[]" value="Spanish"/>Spanish</label>
<label><input type="checkbox" name="langs[]" value="French"/>French</label>
</div>
<div><label>Radios:</label>
<label><input type="radio" name="radio" checked/>One</label>
<label><input type="radio" name="radio"/>Two</label>
<label><input type="radio" name="radio"/>Three</label>
</div>
</section>
<section name="Step 3">
<div>
<h2>Contact:</h2>
<p>What about that handsome select!</p>
</div>
<div><label>Phone:</label><input type="tel" name="phone" data-ideal="phone"/></div>
<div>
<label>State:</label>
<select id="states" name="states">
<option value="default">– Select a State –</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</div>
<div><label>Zip:</label><input type="text" name="zip" data-ideal="zip"/></div>
<div><label>Comments:</label><textarea id="comments" name="comments"></textarea></div>
</section>
<div><hr/></div>
<div>
<button type="submit">Submit</button>
<button id="reset" type="button">Reset</button>
</div>
</form>
<!-- End Form -->
</div>
</div>
</div>
</div><! -- End Main -->
<footer>
<div class="container clearfix">
<div class="row">
<div class="twelvecol last">
<p id="copy">2012. Cedric Ruiz. <a href="http://spacirdesigns.com">Spacir Designs</a>.</p>
<p id="fork">Fork me on github » <a href="https://github.com/elclanrs/jq-idealforms">https://github.com/elclanrs/jq-idealforms</a></p>
</div>
</div>
</div>
</footer>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.min.js"></script>
<script src="js/min/jquery.idealforms.js"></script>
<script>
var options = {
onFail: function() {
alert( $myform.getInvalid().length +' invalid fields.' )
},
inputs: {
'password': {
filters: 'required pass',
},
'username': {
filters: 'required username',
data: {
//ajax: { url:'validate.php' }
}
},
'file': {
filters: 'extension',
data: { extension: ['jpg'] }
},
'comments': {
filters: 'min max',
data: { min: 50, max: 200 }
},
'states': {
filters: 'exclude',
data: { exclude: ['default'] },
errors : {
exclude: 'Select a State.'
}
},
'langs[]': {
filters: 'min max',
data: { min: 2, max: 3 },
errors: {
min: 'Check at least <strong>2</strong> options.',
max: 'No more than <strong>3</strong> options allowed.'
}
}
}
};
var $myform = $('#my-form').idealforms(options).data('idealforms');
$('#reset').click(function(){ $myform.reset().fresh().focusFirst() });
$myform.focusFirst();
</script>
</body>
</html>