-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_13.html
143 lines (142 loc) · 16.9 KB
/
example_13.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
<!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 13. Multicolumns horizontal form</small>
</h1>
</div>
<div class="row">
<div class="col-xs-12 col-sm-9">
<form enctype="multipart/form-data" class="row form-horizontal" action="" method="post">
<div class="col-md-6"><div class="form-group"><label for="input1" class="optional control-label col-md-3">Input 1</label>
<div class="col-md-9">
<input type="text" name="input1" id="input1" value="" dimension="md-6" dimensionLabel="md-3" dimensionControls="md-9" class="form-control"></div></div></div>
<div class="col-md-6"><div class="form-group"><label for="input2" class="optional control-label col-md-3">Input 2</label>
<div class="col-md-9">
<input type="text" name="input2" id="input2" value="" dimension="md-6" dimensionLabel="md-3" dimensionControls="md-9" class="form-control"></div></div></div>
<div class="col-md-6"><div class="form-group"><div class="col-md-9 col-md-offset-3"><div class="checkbox"><label>
<input type="hidden" name="checkbox3" value="0"><input type="checkbox" name="checkbox3" id="checkbox3" value="1" dimension="md-6" dimensionLabel="md-3" dimensionControls="md-9">
Checkbox 3</label></div></div></div></div>
<div class="col-md-6"><div class="form-group"><label for="input4" class="optional control-label col-md-3">Input 4</label>
<div class="col-md-9">
<input type="text" name="input4" id="input4" value="" dimension="md-6" dimensionLabel="md-3" dimensionControls="md-9" class="form-control"></div></div></div>
<div class="col-md-6"><div class="form-group"><label for="select5" class="optional control-label col-md-3">Select 5</label>
<div class="col-md-9">
<select name="select5" id="select5" dimension="md-6" dimensionLabel="md-3" dimensionControls="md-9" class="form-control">
</select></div></div></div>
<div class="col-md-6"><div class="form-group"><label for="file6" class="optional control-label col-md-4">Upload file:</label>
<div class="col-md-8 form-control-static">
<input type="hidden" name="MAX_FILE_SIZE" value="2097152" id="MAX_FILE_SIZE">
<input type="file" name="file6" id="file6" dimension="md-6" dimensionLabel="md-4" dimensionControls="md-8"></div></div></div>
<div class="col-md-6"><div class="form-group"><div class="col-md-9 col-md-offset-3">
<input type="submit" name="submit" id="submit" value="submit" dimension="md-6" dimensionLabel="md-3" dimensionControls="md-9" class="btn btn-primary"></div></div></div></form> <hr>
<div class="highlight">
<code><span style="color: #000000">
<span style="color: #0000BB"><?php
<br />
<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">Application_Form_Example13 </span><span style="color: #007700">extends </span><span style="color: #0000BB">Twitter_Bootstrap3_Form_Horizontal
<br /></span><span style="color: #007700">{
<br />
<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">addClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'row'</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">'text'</span><span style="color: #007700">, </span><span style="color: #DD0000">'input1'</span><span style="color: #007700">, [
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Input 1'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimension' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-6'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionLabel' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-3'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionControls' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-9'</span><span style="color: #007700">,
<br /> ]);
<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">'text'</span><span style="color: #007700">, </span><span style="color: #DD0000">'input2'</span><span style="color: #007700">, [
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Input 2'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimension' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-6'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionLabel' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-3'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionControls' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-9'</span><span style="color: #007700">,
<br /> ]);
<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">'checkbox3'</span><span style="color: #007700">, [
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Checkbox 3'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimension' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-6'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionLabel' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-3'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionControls' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-9'</span><span style="color: #007700">,
<br /> ]);
<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">'text'</span><span style="color: #007700">, </span><span style="color: #DD0000">'input4'</span><span style="color: #007700">, [
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Input 4'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimension' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-6'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionLabel' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-3'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionControls' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-9'</span><span style="color: #007700">,
<br /> ]);
<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">'select'</span><span style="color: #007700">, </span><span style="color: #DD0000">'select5'</span><span style="color: #007700">, [
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Select 5'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimension' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-6'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionLabel' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-3'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionControls' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-9'</span><span style="color: #007700">,
<br /> ]);
<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">'file6'</span><span style="color: #007700">, [
<br /> </span><span style="color: #DD0000">'label' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'Upload file:'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimension' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-6'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionLabel' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-4'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionControls' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-8'</span><span style="color: #007700">,
<br /> ]);
<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">, [
<br /> </span><span style="color: #DD0000">'dimension' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-6'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionLabel' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-3'</span><span style="color: #007700">,
<br /> </span><span style="color: #DD0000">'dimensionControls' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'md-9'</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" 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 active" 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>