-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
905 lines (890 loc) · 42.2 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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>PForm</title>
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Pixel perfect CSS form layouts." />
<meta property="og:title" content="PForm" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://sciactive.com/pform/" />
<meta property="og:image" content="http://sciactive.com/pform/includes/github-logo.png" />
<meta property="og:site_name" content="PForm" />
<meta property="fb:admins" content="508999194" />
<meta property="og:description" content="Pixel perfect CSS form layouts." />
<link href="css/pform.css" media="all" rel="stylesheet" type="text/css" />
<link href="css/pform-bootstrap.css" media="all" rel="stylesheet" type="text/css" />
<!-- Page Style -->
<link href="includes/style.css" rel="stylesheet" type="text/css" />
<!-- jQuery -->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Bootstrap -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" id="bootstrap-css" rel="stylesheet" type="text/css" />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<!-- This is how to change the size. -->
<style type="text/css">
#ex-custom .pf-form {
display: block;
max-width: 340px !important;
}
#ex-custom .pf-form div.pf-element .pf-label, #ex-custom .pf-form div.pf-element .pf-note {
width: 130px !important; /* Width of labels. */
}
#ex-custom .pf-form div.pf-element .pf-group {
margin-left: 130px !important; /* Same as width of labels. */
}
#ex-custom .pf-form div.pf-buttons {
padding-left: 115px !important; /* Width of labels + margin to inputs - button spacing. */
}
#ex-custom .pf-form div.pf-buttons.pf-centered {
padding-left: 0 !important;
}
</style>
<!-- And you need this for IE6. -->
<!--[if lt IE 7]>
<style type="text/css">
#ex-custom .pf-form {
width: 311px !important;
}
#ex-custom .pf-form div.pf-buttons {
width: 176px !important; /* Custom form width - custom button div left padding - 20px (for IE's default padding.) */
}
</style>
<![endif]-->
<style type="text/css">
/* This is an example customization. */
#ex-custom .pf-form {
font-family: sans-serif;
font-size: 13px;
margin: 75px auto 0;
color: #FFF;
background: #e570e7; /* Old browsers */
background: -moz-linear-gradient(top, #e570e7 0%, #c85ec7 47%, #a849a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e570e7), color-stop(47%,#c85ec7), color-stop(100%,#a849a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #e570e7 0%,#c85ec7 47%,#a849a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #e570e7 0%,#c85ec7 47%,#a849a3 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #e570e7 0%,#c85ec7 47%,#a849a3 100%); /* IE10+ */
background: linear-gradient(to bottom, #e570e7 0%,#c85ec7 47%,#a849a3 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e570e7', endColorstr='#a849a3',GradientType=0 ); /* IE6-9 */
border: 1px #701659 solid;
border-radius: 8px;
padding: 20px;
}
#ex-custom .pf-form fieldset {
border: none;
}
#ex-custom .pf-form fieldset legend {
padding-top: .2em;
color: #290020;
text-decoration: none;
border: none;
text-shadow: 0 0 4px #FFF;
filter: dropshadow(color=#FFF, offx=0, offy=0);
}
/* I use div.pf-whatever here so it will be more specific than the ones in the pform stylesheet. */
#ex-custom .pf-form div.pf-heading {
border-bottom-color: #CCC;
border-bottom-style: solid;
}
#ex-custom .pf-form div.pf-element .pf-note {
font-size: 75%;
color: #333;
}
#ex-custom .pf-form div.pf-element .pf-field {
color: #FFF;
background: #7F4C73;
border: 1px #7F4C73 inset;
border-radius: 3px;
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
-moz-transition: border linear 0.2s, box-shadow linear 0.2s;
-o-transition: border linear 0.2s, box-shadow linear 0.2s;
transition: border linear 0.2s, box-shadow linear 0.2s;
}
#ex-custom .pf-form div.pf-element .pf-field:focus {
border-color: rgba(159, 40, 133, 0.8);
outline: 0;
outline: thin dotted \9;
/* IE6-9 */
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(159, 40, 133, 0.6);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(159, 40, 133, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(159, 40, 133, 0.6);
}
#ex-custom .pf-form div.pf-buttons .pf-button {
color: #FFF;
padding: 6px 10px;
border: 1px #662E59 solid;
border-radius: 3px;
background: #cc5fb2; /* Old browsers */
background: -moz-linear-gradient(top, #cc5fb2 0%, #9f488c 6%, #662e59 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc5fb2), color-stop(6%,#9f488c), color-stop(100%,#662e59)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #cc5fb2 0%,#9f488c 6%,#662e59 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #cc5fb2 0%,#9f488c 6%,#662e59 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #cc5fb2 0%,#9f488c 6%,#662e59 100%); /* IE10+ */
background: linear-gradient(to bottom, #cc5fb2 0%,#9f488c 6%,#662e59 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc5fb2', endColorstr='#662e59',GradientType=0 ); /* IE6-9 */
}
#ex-custom .pf-form div.pf-buttons .pf-button:hover {
background: #cc5fb2; /* Old browsers */
background: -moz-linear-gradient(top, #cc5fb2 0%, #8c407a 6%, #662e59 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc5fb2), color-stop(6%,#8c407a), color-stop(100%,#662e59)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #cc5fb2 0%,#8c407a 6%,#662e59 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #cc5fb2 0%,#8c407a 6%,#662e59 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #cc5fb2 0%,#8c407a 6%,#662e59 100%); /* IE10+ */
background: linear-gradient(to bottom, #cc5fb2 0%,#8c407a 6%,#662e59 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc5fb2', endColorstr='#662e59',GradientType=0 ); /* IE6-9 */
}
/* Custom styling to change width. */
#ex-columns .pf-form .pf-element .pf-label, #ex-columns .pf-form .pf-element .pf-note {
width: 160px; /* Width of labels. */
}
#ex-columns .pf-form .pf-element .pf-group {
margin-left: 160px; /* Same as width of labels. */
}
#ex-columns .pf-form .pf-element .pf-field, #ex-columns .pf-form .pf-buttons .pf-button {
margin-left: 15px; /* Margin between inputs and labels. */
}
#ex-columns .pf-form .pf-element .pf-field.pf-full-width {
margin-left: 175px; /* Width of labels + margin between inputs and labels. */
}
/* This is here to show you how to do it, but commented out because these buttons are centered.
#ex-columns .pf-form .pf-buttons {
padding-left: 155px; /* Width of labels + margin to inputs - button spacing. *
}
*/
/* This is just to make it pretty. */
#ex-columns .pf-form .pf-element .pf-label {
font-weight: bold;
}
/* Not pform specific, just make this page a little more presentable. */
.page-points h3 {
margin-top: 0;
}
</style>
<script type="text/javascript">
$(function(){
// Toggle borders in the float example.
var toggle_boxes = function(){
var new_border = ($(this).is(":checked") ? "1px" : "0");
$(this)
.closest(".pf-element")
.find(".pf-label, .pf-note, .pf-field > div")
.css("border-width", new_border);
};
$("#floats input:checkbox").click(toggle_boxes).each(function(){
toggle_boxes.call(this);
});
// Navbar scrollspy.
$('#navbar').scrollspy();
});
</script>
</head>
<body id="page" data-spy="scroll">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://sciactive.com/pform/">PForm</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#page">Overview</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Examples <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="#ex-simple">Simple Example</a></li>
<li><a href="#ex-extensive">Extensive Example</a></li>
<li><a href="#ex-custom">Custom Styling</a></li>
<li><a href="#ex-verify">Verification Form</a></li>
<li><a href="#ex-noborder">Without Border</a></li>
<li><a href="#ex-columns">Columns</a></li>
</ul>
</li>
<li><a href="#floats">Floats in Fields</a></li>
<li><a href="#comments">Comments</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Beyond PForm <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="http://sciactive.com/" target="_blank">SciActive</a></li>
<li><a href="http://nymph.io/" target="_blank">Nymph</a></li>
<li class="divider"></li>
<li><a href="http://sciactive.com/pnotify/" target="_blank">PNotify</a></li>
<li><a href="http://hookphp.org/" target="_blank">HookPHP</a></li>
<li><a href="http://requirephp.org/" target="_blank">RequirePHP</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section class="container page-banner">
<div class="intro-section">
<h1>PForm</h1>
<p id="description">Pixel perfect CSS form layouts.</p>
</div>
<div class="intro-section">
<a class="btn btn-primary btn-large" href="https://github.com/sciactive/pform/releases">Download Source</a>
<a class="right-button btn btn-default btn-large" href="http://github.com/sciactive/pform" title="Fork me on GitHub">PForm on GitHub <img src="includes/github-icon.png" alt="GitHub Icon" /></a>
</div>
</section>
<div class="page-points">
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="alert">
<h3><i class="glyphicon glyphicon-star" style="position: relative; top: 3px;"></i> LESS Powered</h3>
<p>
PForm 3 uses <a href="http://lesscss.org/" target="_blank">Less</a>,
instead of plain CSS. This lets you customize
colors, widths, margins, and more!
</p>
</div>
</div>
<div class="col-sm-4">
<div class="alert">
<h3><i class="glyphicon glyphicon-list-alt" style="position: relative; top: 3px;"></i> Cross-Browser</h3>
<p>
PForm works in all major browsers and provides
a consistent layout. It is tested thoroughly for
consistency.
</p>
</div>
</div>
<div class="col-sm-4">
<div class="alert">
<h3><i class="glyphicon glyphicon-ok" style="position: relative; top: 3px;"></i> Old Browsers</h3>
<p>
PForm is 100% documented, standard CSS styles that are supported
in even very old browsers. Your forms will look good even if your
customers are using a potato to view them.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="alert">
<h3><i class="glyphicon glyphicon-pencil" style="position: relative; top: 3px;"></i> Semantic</h3>
<p>
There are no specific elements you must use for
PForm. This allows you to use the most
semantically correct elements (inluding HTML5
elements) in your design.
</p>
</div>
</div>
<div class="col-sm-4">
<div class="alert">
<h3><i class="glyphicon glyphicon-resize-small" style="position: relative; top: 3px;"></i> Responsive</h3>
<p>
Responsive design means PForm looks good on any
device, from the biggest widescreen monitor to
the smallest smartphone. Resize your browser to
see it in action.
</p>
</div>
</div>
<div class="col-sm-4">
<div class="alert">
<h3><i class="glyphicon glyphicon-gift" style="position: relative; top: 3px;"></i> Completely Open</h3>
<p>
PForm is distributed under the
<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache 2</a>
license.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="page-header">
<h2>What is PForm?</h2>
</div>
<p style="font-size: 1.2em; line-height: 1.2em;">
PForm is a CSS layout library for forms. It
positions the elements of a form in a consistent
manner. You can use PForm in your project to make your forms
consistent.
</p>
</div>
<div class="col-sm-6">
<div class="page-header">
<h2>What isn't PForm?</h2>
</div>
<p style="font-size: 1.2em; line-height: 1.2em;">
PForm is not a graphical styling library. There are
very few colors and no images included in PForm. (This page is
styled with
<a href="http://getbootstrap.com/" target="_blank">Bootstrap</a>.)
</p>
<p style="font-size: 1.2em; line-height: 1.2em;">
PForm is also not a typographical library. It
doesn't change your fonts.
</p>
</div>
</div>
</div>
</div>
<div class="clearfix" style="margin-bottom: 150px;"> </div>
<div id="sections">
<div class="container">
<div id="ex-simple">
<form class="pf-form" action="#" method="post">
<div class="pf-element pf-heading">
<h3>Simple Example Form</h3>
</div>
<div class="pf-element">
<label><span class="pf-label">Username</span>
<input class="pf-field form-control" type="text" name="username" /></label>
</div>
<div class="pf-element">
<label><span class="pf-label">Password</span>
<input class="pf-field form-control" type="password" name="password" /></label>
</div>
<div class="pf-element">
<label><span class="pf-label">Remember Me</span>
<span class="pf-note">Lasts for 2 weeks.</span>
<input class="pf-field" type="checkbox" name="remember" /></label>
</div>
<div class="pf-element pf-buttons">
<input class="pf-button btn btn-primary" type="submit" name="submit" value="Submit" />
<input class="pf-button btn btn-default" type="reset" name="reset" value="Reset" />
</div>
</form>
<!-- Anything after a form without a fieldset needs to be cleared if you support IE 5.5 -->
<br style="clear: both; height: 0;" />
</div>
<div id="ex-extensive">
<div class="page-header">
<h2>Extensive Example</h2>
</div>
<div class="row">
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Layout Style</h3>
</div>
<div class="panel-body">
You can choose between:
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn btn-default active" onclick="$('#ext-form').removeClass('pf-layout-block');">Inline Layout</button>
<button class="btn btn-default" onclick="$('#ext-form').addClass('pf-layout-block');">Block Layout</button>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Or Individually</h3>
</div>
<div class="panel-body">
You can toggle block layout on specific elements:
<button class="btn btn-default" data-loading-text="Now Click an Element in the Form" onclick="var btn = $(this); btn.button('loading'); $('#ext-form').off('click mouseenter mouseleave', '.pf-element:not(.pf-heading)').on('mouseenter', '.pf-element:not(.pf-heading)', function(){$(this).css('outline', '1px yellow solid')}).on('mouseleave', '.pf-element:not(.pf-heading)', function(){$(this).css('outline', '0')}).on('click', '.pf-element:not(.pf-heading)', function(){$(this).css('outline', '0').toggleClass('pf-layout-block'); $('#ext-form').off('click mouseenter mouseleave', '.pf-element:not(.pf-heading)'); btn.button('reset'); return false});">Toggle an Element</button>
</div>
</div>
</div>
</div>
<form class="pf-form" id="ext-form" action="#" method="post">
<div class="pf-element pf-heading">
<h3>Extensive Example Form</h3>
<p>This form is an example, and this is a description of it.</p>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">This is a test. <span class="pf-required">*</span></span>
<span class="pf-note">This is a note about something.</span>
<input class="pf-field form-control" type="text" name="test" />
</label>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">This is also a test. <span class="pf-required">*</span></span>
<span class="pf-group">
<input class="pf-field form-control" type="text" name="test2" style="width: 100%;" />
</span>
</label>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">Try clicking these labels. <span class="pf-required">*</span></span>
<span class="pf-note">They'll put focus on the input.</span>
<span class="pf-field">Fill in the <input class="form-control" type="text" name="test" size="5" />.</span>
</label>
</div>
<!-- You can put pf-completed on the pf-element div too. -->
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">This is completed. <span class="pf-required pf-completed">*</span></span>
<span class="pf-group">
<span class="pf-field" style="display: block;">
<input class="form-control" type="text" name="test" /><br />
<span class="pf-note">This note is over here.</span>
</span>
</span>
</label>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">Is this a test?</span>
<span class="pf-note">It might just be a trick.</span>
<input class="pf-field" type="checkbox" name="checktest" />
</label>
</div>
<div class="pf-element pf-full-width">
<span class="pf-label">Is this really a test?</span>
<div class="pf-group">
<label><input class="pf-field" type="radio" name="radiotest" /> Yes</label>
<label><input class="pf-field" type="radio" name="radiotest" /> No</label>
</div>
</div>
<div class="pf-element pf-heading">
<h4>Foods</h4>
</div>
<div class="pf-element pf-full-width">
<span class="pf-label">What's your favorite food?</span>
<span class="pf-note">Your answer will determine your eligibility for spaaaaaaaaaace.</span>
<div class="pf-group">
<label><input class="pf-field" type="radio" name="radiotest" /> Hot Dogs</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Hamburgers</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Cheeseburgers</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Sushi</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Pizza</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Steak</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Ham</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Turkey</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Mashed Potatoes</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Eggs</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Bacon</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Cake</label><br />
<label><input class="pf-field" type="radio" name="radiotest" /> Ice Cream</label>
</div>
</div>
<div class="pf-element pf-full-width">
<span class="pf-label">What foods do you like?</span>
<span class="pf-note">Hold CTRL to select multiples.</span>
<select class="pf-field form-control" name="likefoods" multiple="multiple" size="4">
<option>Hot Dogs</option>
<option>Hamburgers</option>
<option>Cheeseburgers</option>
<option>Sushi</option>
<option>Pizza</option>
<option>Steak</option>
<option>Ham</option>
<option>Turkey</option>
<option>Mashed Potatoes</option>
<option>Eggs</option>
<option>Bacon</option>
<option>Cake</option>
<option>Ice Cream</option>
</select>
</div>
<div class="pf-element pf-heading">
<h4>More Tests</h4>
</div>
<!-- This line break is required for Firefox 1.5 if you follow a "pf-element" div with a "pf-group" fieldset.
(https://bugzilla.mozilla.org/show_bug.cgi?id=309550) -->
<br />
<fieldset class="pf-group pf-labels-right">
<legend>Complex Tests</legend>
<div class="pf-element pf-heading">
<p>These tests require a complex grasp on reality to correctly comprehend.</p>
</div>
<div class="pf-element pf-full-width">
<span class="pf-label">Complexity is Increased</span>
<span class="pf-note">Hold CTRL to select multiples.</span>
<select class="pf-field form-control" name="likefoods" multiple="multiple" size="3">
<option>English</option>
<option>Spanish</option>
<option>French</option>
<option>German</option>
<option>Lojban</option>
</select>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">Did you notice? <span class="pf-required">*</span></span>
<span class="pf-note">The labels in this section are aligned right.</span>
<select class="pf-field form-control" name="complex">
<option>This is an option.</option>
<option>This is another option.</option>
</select>
</label>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label pf-labels-left">Except this label.</span>
<select class="pf-field form-control" name="complex">
<option>This is an option.</option>
<option>This is another option.</option>
</select>
</label>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">This is a long complex test.</span>
<select class="pf-field form-control" name="longcomplex" size="6">
<option>1. This is a lot of options.</option>
<option>2. This is a lot of options.</option>
<option>3. This is a lot of options.</option>
<option>4. This is a lot of options.</option>
<option>5. This is a lot of options.</option>
<option>6. This is a lot of options.</option>
<option>7. This is a lot of options.</option>
<option>8. This is a lot of options.</option>
<option>9. This is a lot of options.</option>
<option>10. This is a lot of options.</option>
<option>11. This is a lot of options.</option>
<option>12. This is a lot of options.</option>
<option>13. This is a lot of options.</option>
<option>14. This is a lot of options.</option>
<option>15. This is a lot of options.</option>
<option>16. This is a lot of options.</option>
<option>17. This is a lot of options.</option>
<option>18. This is a lot of options.</option>
<option>19. This is a lot of options.</option>
<option>20. This is a lot of options.</option>
</select>
</label>
</div>
</fieldset>
<fieldset class="pf-group">
<legend>Simple Tests</legend>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">This is a test.</span>
<span class="pf-note">This is a note about something.</span>
<input class="pf-field form-control" type="text" name="test" />
</label>
</div>
</fieldset>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">What do you think of my tests? <span class="pf-required">*</span></span>
<span class="pf-note">I won't actually be reading this, it's just an example.</span>
<span class="pf-note">You can't even submit this form. It won't go anywhere.</span>
<span class="pf-group">
<span class="pf-field"><textarea style="width: 100%;" class="form-control" name="comment" rows="5" cols="30"></textarea></span>
</span>
</label>
</div>
<div class="pf-element pf-buttons">
<input class="pf-button btn btn-primary" type="submit" name="submit" value="Submit" />
<input class="pf-button btn btn-default" type="reset" name="reset" value="Reset" />
</div>
</form>
<!-- Anything after a form without a fieldset needs to be cleared if you support IE 5.5 -->
<br style="clear: both; height: 0;" />
</div>
<div id="ex-custom">
<div class="page-header">
<h2>Custom Styling</h2>
</div>
<!-- Use these conditional comments for centering if you support IE 5.5 -->
<!--[if lt IE 6]>
<center>
<![endif]-->
<form class="pf-form pf-labels-right" action="#" method="post">
<fieldset>
<legend>Custom Styling Form</legend>
<div class="pf-element pf-heading">
<p>This form is custom styled!</p>
</div>
<div class="pf-element">
<label><span class="pf-label">Username</span>
<input class="pf-field form-control" type="text" name="username" style="width: 130px;" /></label>
</div>
<div class="pf-element">
<label><span class="pf-label">Password</span>
<input class="pf-field form-control" type="password" name="password" style="width: 130px;" /></label>
</div>
<div class="pf-element">
<label><span class="pf-label">Remember Me</span>
<span class="pf-note">Lasts for 2 weeks.</span>
<input class="pf-field" type="checkbox" name="remember" /></label>
</div>
<div class="pf-element pf-buttons pf-centered">
<input class="pf-button" type="submit" name="submit" value="Submit" />
<input class="pf-button" type="reset" name="reset" value="Reset" />
</div>
</fieldset>
</form>
<!--[if lt IE 6]>
</center>
<![endif]-->
</div>
<div id="ex-verify">
<div class="page-header">
<h2>Verification Form</h2>
</div>
<form class="pf-form" action="#" method="post">
<fieldset>
<legend>Verify this Information</legend>
<div class="pf-element">
<span class="pf-label">Mary had a little...</span>
<span class="pf-note">This is not optional!</span>
<span class="pf-field">Lamb.</span>
</div>
<div class="pf-element">
<span class="pf-label">Whose fleece was white as...</span>
<span class="pf-field">Baking soda.</span>
</div>
<div class="pf-element">
<span class="pf-label">Everywhere that Mary went...</span>
<span class="pf-field">The lamb was Abe Vigoda.</span>
</div>
<div class="pf-element pf-buttons">
<button class="pf-button btn btn-primary" type="submit" name="submit">This is Correct</button>
<button class="pf-button btn btn-default" type="button" name="changes">Make Changes</button>
</div>
</fieldset>
</form>
</div>
<div id="ex-noborder">
<div class="page-header">
<h2>Without Border</h2>
</div>
<form class="pf-form" action="#" method="post">
<div class="pf-element pf-heading">
<h3>Fixed Width - No Border Form</h3>
<p>This form has fixed width elements and no border.</p>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">This is a test. <span class="pf-required">*</span></span>
<span class="pf-note">This is a note about something.</span>
<span class="pf-group">
<input class="pf-field form-control" type="text" name="test" style="max-width: 400px; width: 100%;" />
</span>
</label>
</div>
<div class="pf-element pf-full-width">
<label>
<span class="pf-label">What do you think of my tests?</span>
<span class="pf-group">
<textarea class="pf-field form-control" name="comment" rows="5" cols="30" style="max-width: 400px; width: 100%;"></textarea>
</span>
</label>
</div>
<div class="pf-element">
<span class="pf-note">Watch out for lions around the submit button.</span>
</div>
<div class="pf-element pf-buttons">
<button class="pf-button btn btn-primary" type="submit" name="submit">Submit</button>
<span class="pf-field">Lion.</span>
<button class="pf-button btn btn-default" type="reset" name="reset">Reset</button>
</div>
</form>
<!-- Anything after a form without a fieldset needs to be cleared if you support IE 5.5 -->
<br style="clear: both; height: 0;" />
</div>
<div id="ex-columns">
<div class="page-header">
<h2>Columns</h2>
</div>
<form class="pf-form pf-labels-right" action="#" method="post">
<fieldset>
<legend>Form With Columns</legend>
<div class="pf-element pf-heading">
<p>This form tests columns of elements to conserve space on wider screens. This uses Bootstrap, but any CSS grid should work. Try resizing the browser window.</p>
</div>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="pf-element">
<label>
<span class="pf-label">1. Test Input</span>
<span class="pf-note">This is a note.</span>
<input class="pf-field form-control" type="text" name="test" />
</label>
</div>
</div>
<div class="col-sm-6">
<div class="pf-element">
<label>
<span class="pf-label">2. Test Input</span>
<input class="pf-field form-control" type="text" name="test2" />
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="pf-element">
<label>
<span class="pf-label">3. Test Input</span>
<span class="pf-field">Fill in the <input class="form-control" type="text" name="test" size="5" />.</span>
</label>
</div>
</div>
<div class="col-sm-6">
<div class="pf-element">
<label>
<span class="pf-label">4. Test Input</span>
<input class="pf-field" type="checkbox" name="checktest" />
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="pf-element">
<span class="pf-label">5. Test Input</span>
<div class="pf-group">
<label><input class="pf-field" type="radio" name="radiotest" />Yes</label>
<label><input class="pf-field" type="radio" name="radiotest" />No</label>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="pf-element">
<span class="pf-label">6. Test Input</span>
<select class="pf-field form-control" name="likefoods" multiple="multiple" size="4">
<option>Hot Dogs</option>
<option>Hamburgers</option>
<option>Cheeseburgers</option>
<option>Sushi</option>
<option>Pizza</option>
<option>Steak</option>
<option>Ham</option>
<option>Turkey</option>
<option>Mashed Potatoes</option>
<option>Eggs</option>
<option>Bacon</option>
<option>Cake</option>
<option>Ice Cream</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="pf-element">
<label>
<span class="pf-label">7. Test Input</span>
<select class="pf-field form-control" name="longcomplex" size="6">
<option>1. This is a lot of options.</option>
<option>2. This is a lot of options.</option>
<option>3. This is a lot of options.</option>
<option>4. This is a lot of options.</option>
<option>5. This is a lot of options.</option>
<option>6. This is a lot of options.</option>
<option>7. This is a lot of options.</option>
<option>8. This is a lot of options.</option>
<option>9. This is a lot of options.</option>
<option>10. This is a lot of options.</option>
<option>11. This is a lot of options.</option>
<option>12. This is a lot of options.</option>
<option>13. This is a lot of options.</option>
<option>14. This is a lot of options.</option>
<option>15. This is a lot of options.</option>
<option>16. This is a lot of options.</option>
<option>17. This is a lot of options.</option>
<option>18. This is a lot of options.</option>
<option>19. This is a lot of options.</option>
<option>20. This is a lot of options.</option>
</select>
</label>
</div>
</div>
<div class="col-sm-6">
<div class="pf-element">
<label>
<span class="pf-label">8. Test Input</span>
<textarea class="pf-field form-control" name="comment" rows="5" cols="30"></textarea>
</label>
</div>
</div>
</div>
</div>
<div class="pf-element pf-buttons pf-centered">
<input class="pf-button btn btn-primary" type="submit" name="submit" value="Submit" />
<input class="pf-button btn btn-default" type="reset" name="reset" value="Reset" />
</div>
</fieldset>
</form>
</div>
<div id="floats">
<div class="page-header">
<h2>Using Floats in Fields</h2>
</div>
<div class="pf-form">
<div class="pf-element">
In the following examples, use the checkboxes to toggle borders around each section.
<ul>
<li>IE6: The examples and the solution don't work.</li>
<li>IE7: The problem doesn't happen anyway.</li>
</ul>
</div>
<!-- This line break is required for Firefox 1.5 if you follow a "pf-element" div with a "pf-group" fieldset.
(https://bugzilla.mozilla.org/show_bug.cgi?id=309550) -->
<br />
<fieldset class="pf-group">
<legend>The Problem</legend>
<div class="pf-element pf-heading">
<p>When a floated element goes in a field with a note present, the note will push the element down below the label.</p>
</div>
<div class="pf-element pf-full-width">
<span class="pf-label" style="border: 0 solid red;">A Label</span>
<span class="pf-note" style="border: 0 solid green;">A note.</span>
<div class="pf-field pf-full-width">
<div style="border: 0 solid blue; float: left;">
<label><input type="checkbox" checked="checked" /> This div is floated left.</label>
</div>
</div>
</div>
</fieldset>
<fieldset class="pf-group">
<legend>The Solution</legend>
<div class="pf-element pf-heading">
<p>To fix this problem, place the note inside the label element.</p>
</div>
<div class="pf-element pf-full-width">
<span class="pf-label" style="border: 0 solid red;">
A Label
<span class="pf-note" style="border: 0 solid green;">A note.</span>
</span>
<div class="pf-field pf-full-width">
<div style="border: 0 solid blue; float: left;">
<label><input type="checkbox" checked="checked" /> This div is floated left.</label>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div id="comments">
<div class="page-header">
<h2>Comments</h2>
</div>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'pform'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
</div>
<p id="copyright">© 2011-2014 SciActive.com. All Rights Reserved.</p>
</body>
</html>