-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_01.html
103 lines (100 loc) · 9.39 KB
/
example_01.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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Form</title>
<link rel="stylesheet" href="vendor/bootstrap-3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="vendor/bootstrap-3.3.7/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="patch.css">
<style>
.highlight {
padding: 9px 14px;
margin-bottom: 14px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
border-radius: 4px;
}
</style>
</head>
<body style="margin-bottom: 30px;">
<div class="container">
<div class="page-header">
<h1>
Bootstrap 3 Form from Zend Framework 1
<small>Example 1. Basic example</small>
</h1>
</div>
<div class="row">
<div class="col-xs-12 col-sm-9">
<form enctype="multipart/form-data" class="form-vertical" action="" method="post">
<div class="form-group"><label for="email" class="control-label optional">Email address</label>
<input type="email" name="email" id="email" value="" placeholder="Enter email" class="form-control"></div>
<div class="form-group"><label for="password" class="control-label optional">Password</label>
<input type="password" name="password" id="password" value="" placeholder="Password" class="form-control"></div>
<div class="form-group"><label for="file" class="control-label optional">File input</label>
<input type="hidden" name="MAX_FILE_SIZE" value="2097152" id="MAX_FILE_SIZE">
<input type="file" name="file" id="file">
<p class="help-block">Example block-level help text here.</p></div>
<div class="form-group"><div class="checkbox"><label>
<input type="hidden" name="checkbox" value="0"><input type="checkbox" name="checkbox" id="checkbox" value="1">
Check me out</label></div></div>
<div class="form-group">
<input type="submit" name="submit" id="submit" value="Submit" class="btn btn-primary"></div></form> <hr>
<div class="highlight">
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">Application_Form_Example1 </span><span style="color: #007700">extends </span><span style="color: #0000BB">Twitter_Bootstrap3_Form_Vertical
<br /></span><span style="color: #007700">{
<br /> public function </span><span style="color: #0000BB">init</span><span style="color: #007700">()
<br /> {
<br /> </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">addElement</span><span style="color: #007700">(</span><span style="color: #DD0000">'email'</span><span style="color: #007700">, </span><span style="color: #DD0000">'email'</span><span style="color: #007700">, array(
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Email address'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'placeholder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Enter email'</span><span style="color: #007700">,
<br /> ));
<br /> </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">addElement</span><span style="color: #007700">(</span><span style="color: #DD0000">'password'</span><span style="color: #007700">, </span><span style="color: #DD0000">'password'</span><span style="color: #007700">, array(
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Password'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'placeholder' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Password'</span><span style="color: #007700">,
<br /> ));
<br /> </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">addElement</span><span style="color: #007700">(</span><span style="color: #DD0000">'file'</span><span style="color: #007700">, </span><span style="color: #DD0000">'file'</span><span style="color: #007700">, array(
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'File input'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'description' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Example block-level help text here.'</span><span style="color: #007700">,
<br /> ));
<br /> </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">addElement</span><span style="color: #007700">(</span><span style="color: #DD0000">'checkbox'</span><span style="color: #007700">, </span><span style="color: #DD0000">'checkbox'</span><span style="color: #007700">, array(
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Check me out'</span><span style="color: #007700">,
<br /> ));
<br /> </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">addElement</span><span style="color: #007700">(</span><span style="color: #DD0000">'submit'</span><span style="color: #007700">, </span><span style="color: #DD0000">'submit'</span><span style="color: #007700">, array(
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Submit'</span><span style="color: #007700">,
<br /> ));
<br /> }
<br />}
<br /></span>
</span>
</code> </div>
</div>
<div class="col-xs-6 col-sm-3">
<div class="list-group">
<a class="list-group-item" href="index.html">All Elements</a>
<a class="list-group-item active" href="example_01.html"><small>Example 1.</small> Basic example</a>
<a class="list-group-item" href="example_02.html"><small>Example 2.</small> Inline form</a>
<a class="list-group-item" href="example_03.html"><small>Example 3.</small> With input group addon</a>
<a class="list-group-item" href="example_04.html"><small>Example 4.</small> Horizontal form</a>
<a class="list-group-item" href="example_05.html"><small>Example 5.</small> Checkboxes and radios</a>
<a class="list-group-item" href="example_06.html"><small>Example 6.</small> Disabled state</a>
<a class="list-group-item" href="example_07.html"><small>Example 7.</small> Readonly state</a>
<a class="list-group-item" href="example_08.html"><small>Example 8.</small> Validation states</a>
<a class="list-group-item" href="example_09.html"><small>Example 9.</small> With optional icons</a>
<a class="list-group-item" href="example_10.html"><small>Example 10.</small> Horizontal form group sizes</a>
<a class="list-group-item" href="example_11.html"><small>Example 11.</small> Optional icons in inline forms</a>
<a class="list-group-item" href="example_12.html"><small>Example 12.</small> Horizontal form group sizes</a>
<a class="list-group-item" href="example_13.html"><small>Example 13.</small> Multicolumns horizontal form</a>
<a class="list-group-item" href="example_14.html"><small>Example 14.</small> Checkboxes and radios</a>
</div>
</div>
</div>
</div>
<script src="vendor/jquery-1.11.2.min.js"></script>
<script src="vendor/bootstrap-3.3.7/js/bootstrap.min.js"></script>
</body>
</html>