-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.html
executable file
·295 lines (294 loc) · 14.5 KB
/
docs.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dynamic Form Filter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="all" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" media="all" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" media="all" href="css/main.css">
<link rel="icon" href="img/favicon.ico" type="image/icon" sizes="16x16">
<script type="text/javascript" src="js/libs/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="js/libs/bootstrap.min.js"></script>
</head>
<body>
<header class="navbar">
<div class="container">
<div class="row">
<div class="col-md-12">
<nav class="navbar navbar-static-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9">
<span class="sr-only">Toggle</span>
<span class="icon-bar orange"></span>
<span class="icon-bar orange"></span>
<span class="icon-bar orange"></span>
</button>
<a class="navbar-brand" href="#">
<span class="glyphicon glyphicon-grain"></span> <span>bluejson</span>
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-9" nav-collapse="">
<ul class="nav navbar-nav">
<li><a href="index.html">Demo</a></li>
<li class="active"><a href="docs.html">Docs</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>
</header>
<section>
<div class="header">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<h1>Dynamic Form Filter</h1>
</div>
<div class="col-md-12">
<p class="sub-header">Plugin to create dynamic form elements in rows.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="body">
<div class="container">
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Description</h4>
<p>This jQuery plugin creates a dynamic form. Form elements declare by user as per the need.. Currently this is available for all type of input elements, select and teaxarea.</p>
<code>Current version: 1.0.1</code>
<p>Download this plugin and use it to create dynamic form elements.</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Features</h4>
<ul>
<li>Fully customized</li>
<li>Responsive</li>
<li>Tested: jQuery 1.11.x in Firefox, Safari, Chrome, Internet Explorer 9, 10,11, Opera</li>
<li>Lightweight: 7B of JavaScript (less than 3KBs gzipped).</li>
<li>Define Limits of row and dynamic messages.</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Instructions & Help</h4>
<p>
First read usage of plugin (see below). If you found any issue or want any help submit it at <a class="user-mention" href="https://github.com/yoku2010/dynamic-form-filter">GitHub</a> or email me <a class="user-mention" href="mailto:[email protected]">[email protected]</a>
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Download</h4>
<p>
<a class="btn btn-default" href="https://github.com/yoku2010/dynamic-form-filter/">View Project</a>
<a class="btn btn-default" href="https://github.com/yoku2010/dynamic-form-filter/zipball/master">.zip file</a>
<a class="btn btn-default" href="https://github.com/yoku2010/dynamic-form-filter/tarball/master">.tar.gz file</a>
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Installation</h4>
<p>
After plugin downloading. Import these js and css file into your page and call plugin to create dynamic form (see usage).
</p>
<pre>
<!-- CSS files-->
<link rel="stylesheet" type="text/css" media="all" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" media="all" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" media="all" href="css/form-filter.css">
<!-- JS files-->
<script type="text/javascript" src="js/libs/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/libs/bootstrap.min.js"></script>
<script type="text/javascript" src="js/libs/form-filter.js"></script></pre>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Usage</h4>
<p>jQuery Dynamic Form Filter Plugin accepts setting (Json Object) to behave differently, It can be assigned to any HTML element (preferred element is div) or create new element.</p>
<div class="panel panel-default">
<div class="panel-body">
<pre>
// Format:
$(selector).filterForm({key:value, key:value, key:value});</pre>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<pre>
// Examples:
$('#form_filter').filterForm({
btnName: 'Add Filter',
helpBox: true,
helpMsg: 'Click on "Add Filter" to add elements in row.',
noElemMsg: 'No element details.',
enableRowLevelAddition: true,
arrayInput: true,
rowElems: [[
{
tag: 'input',
type: 'text',
'name': 'first_name',
cl: null,
placeholder: 'First Name'
},
{
tag: 'input',
type: 'text',
'name': 'last_name',
cl: null,
placeholder: 'Last Name'
},
{
tag: 'input',
type: 'checkbox',
'name': 'is_passport',
cl: null,
placeholder: 'Do you have passport?'
},
{
tag: 'textarea',
'name': 'address',
cl: null,
placeholder: 'Address'
},
{
tag: 'select',
opts: [
{
text: '- Choose Country -'
},
{
text: 'India',
value: 'IN'
},
{
text: 'United States of America',
value: 'USA'
},
{
text: 'New Zealand',
value: 'NZ'
}
],
'name': 'value',
cl: null,
placeholder: 'Value'
}
]],
rowLimit: 2,
subRowLimit: 4
});
</pre>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Demo</h4>
<p><a href="index.html">Click Here</a> to see demos of Dynamic Form Filter plugin.</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h4><span class="glyphicon glyphicon-share-alt"></span> Settings</h4>
<table class="table table-condensed table-striped table-hover table-bordered">
<thead>
<tr>
<th class="pro">Property</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><em>btnName</em></td>
<td>Add Filter</td>
<td>To define name of the button.</td>
</tr>
<tr>
<td><em>helpBox</em></td>
<td>true</td>
<td>true will show help box otherwise i will hide that box.</td>
</tr>
<tr>
<td><em>helpMsg</em></td>
<td>Click on "Add Filter" to add elements in row</td>
<td>To define help message in help box</td>
</tr>
<tr>
<td><em>noElemMsg</em></td>
<td>No element details.</td>
<td>This message will display only in one case If developer didn't define any element in the form</td>
</tr>
<tr>
<td><em>enableRowLevelAddition</em></td>
<td>true</td>
<td>true value allows row level form element addition.</td>
</tr>
<tr>
<td><em>arrayInput</em></td>
<td>true</td>
<td>true value appends <em>'[]'</em> in element's name.</td>
</tr>
<tr>
<td><em>rowElems</em></td>
<td>[{<i>element json</i>}, {<i>element json</i>}]</td>
<td>It is list of element<pre>
{
tag: '<i>"input|textarea|select"</i>',
type: 'type of input tag (no need in textarea and select)',
name: 'name of the element',
cl: 'class name of the element',
placeholder: 'placeholder for elements',
opts: [ // on for select tag
{
text: 'option text',
value: 'option value'
},
]
}
</pre></td>
</tr>
<tr>
<td><em>rowLimit</em></td>
<td>Infinity</td>
<td>Define limit of row in a form. Value should not be less than 0.</td>
</tr>
<tr>
<td><em>subRowLimit</em></td>
<td>Infinity</td>
<td>Define limit of element row. Value should not be less than 1.</td>
</tr>
</tbody>
</table>
<p>Follow me on <a class="user-mention" href="https://twitter.com/yoku_2010">Twitter</a>,<a class="user-mention" href="https://github.com/yoku2010">GitHub</a>,<a class="user-mention" href="http://www.linkedin.com/pub/yogesh-kumar/22/1b0/997">LinkedIn</a> or <a class="user-mention" href="http://www.facebook.com/yoku2010">Facebook</a></p>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="footer">
<div class="container">
<div class="row">
<div class="text-center small">© 2015 bluejson</div>
</div>
</div>
</div>
</footer>
</body>
</html>