-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·477 lines (457 loc) · 27.8 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documentation | surveyJS - JavaScript Survey Creation & Management. Made Easy</title>
<meta name="description" content="JavaScript Survey Creation & Management. Made Easy">
<meta name="keywords" content="survey, question, answer, javascript, plugin, ajax, json">
<meta name="author" content="Valerio Di Punzio">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Expletus+Sans:500|Raleway:200&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/stackSlider.css">
<link rel="stylesheet" href="css/doc.css">
<link rel="stylesheet" href="css/demo.css">
<link rel="stylesheet" href="css/demo-stackslider.css">
<link rel="stylesheet" href="css/prism.css">
<script defer src="js/prism.js"></script>
<!-- DYNAMICALLY LOAD POLYFILLS -> REQUIRED TO SUPPORT IE 10/11 AND SOME EDGE VERSIONS -->
<script defer src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Array.from,Element.prototype.closest,Element.prototype.matches,Promise,Promise.prototype.finally,AbortController,fetch,Event"></script>
<script defer src="js/vendors/formjs.min.js"></script>
<script defer src="dist/surveyjs.min.js"></script>
<!-- ONLY FOR DOCUMENTATION DEMO SLIDER -->
<script defer src="js/vendors/modernizr_custom_63321.js"></script>
<script defer src="js/vendors/jquery-1.12.4.min.js"></script>
<script defer src="js/vendors/bootstrap.bundle.min.js"></script>
<script defer src="js/vendors/jquery_stackslider.js"></script>
<script defer src="js/demos/doc.js"></script>
<script defer src="js/include.js"></script>
</head>
<body>
<div id="top" class="container-fluid d-flex flex-column">
<div id="menu" class="position-sticky text-right d-flex">
<div class="position-raltive w-100">
<a href="index.html" class="logo">S</a>
<nav class="position-absolute nav-desktop d-none d-md-flex align-items-center">
<a href="index.html" class="p-2 m-2">Home</a>
<a href="get-started.html" class="p-2 m-2">Get Started</a>
<a href="api.html" class="p-2 m-2">API</a>
<a href="demos.html" class="p-2 m-2">Demos</a>
<a href="https://github.com/SimplySayHi/surveyJS" target="_blank" class="github-logo ml-2">
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="28px" height="28px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M16,0.112c-8.836,0-16,7.294-16,16.291 C0,23.6,4.584,29.706,10.942,31.86c0.801,0.148 1.093-0.354,1.093-0.785c0-0.387-0.015-1.412-0.021-2.771 c-4.451,0.984-5.39-2.184-5.39-2.184c-0.729-1.881-1.777-2.383-1.777-2.383c-1.452-1.01,0.11-0.99,0.11-0.99 .605,0.115,2.45,1.68,2.45,1.68c1.428,2.488,3.745,1.77,4.657,1.354c0.145-1.053,0.559-1.771,1.016-2.178 c-3.553-0.412-7.288-1.809-7.288-8.051c0-1.778,0.623-3.232,1.646-4.371c-0.164-0.412-0.713-2.068,0.157-4.311 c0,0,1.344-0.438,4.399,1.67c1.276-0.361,2.646-0.543,4.006-0.549c1.359,0.006,2.728,0.188,4.006,0.549 c3.056-2.108,4.396-1.67,4.396-1.67c0.873,2.242,0.323,3.898,0.159,4.311c1.024,1.139,1.644,2.593,1.644,4.371 c0,6.258-3.74,7.635-7.305,8.038c0.574,0.504,1.086,1.498,1.086,3.018c0,2.178-0.02,3.934-0.02,4.469 c0,0.436,0.288,0.941,1.101,0.783C27.421,29.7,32,23.598,32,16.403C32,7.406,24.837,0.112,16,0.112z" />
</svg>
</a>
</nav>
<div class="position-absolute dropdown d-inline-block d-md-none">
<button class="btn dropdown-toggle dropdown-red-outline py-0 px-2" data-toggle="dropdown" type="button">
menu
</button>
<span class="dropdown-menu">
<a class="dropdown-item" href="index.html">Home</a>
<a class="dropdown-item" href="get-started.html">Get Started</a>
<a class="dropdown-item" href="api.html">API</a>
<a class="dropdown-item" href="demos.html">Demos</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://github.com/SimplySayHi/surveyJS" target="_blank">View on Github</a>
<a class="dropdown-item" href="https://github.com/SimplySayHi/surveyJS/issues" target="_blank">Report a Bug</a>
</span>
</div>
</div>
</div>
<div id="hero" class="d-flex flex-column justify-content-center">
<div class="row pt-5 justify-content-center">
<div id="intro" class="col-lg-6 text-center text-lg-left d-flex flex-column mt-4">
<div class="d-md-none">
<p class="d-inline-block my-4">
<a href="https://github.com/SimplySayHi/surveyJS" target="_blank" class="media">
<span class="media-body interline-normal">view on <br />Github</span>
<svg class="align-self-center ml-2" style="vertical-align: middle;" version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M16,0.112c-8.836,0-16,7.294-16,16.291 C0,23.6,4.584,29.706,10.942,31.86c0.801,0.148 1.093-0.354,1.093-0.785c0-0.387-0.015-1.412-0.021-2.771 c-4.451,0.984-5.39-2.184-5.39-2.184c-0.729-1.881-1.777-2.383-1.777-2.383c-1.452-1.01,0.11-0.99,0.11-0.99 .605,0.115,2.45,1.68,2.45,1.68c1.428,2.488,3.745,1.77,4.657,1.354c0.145-1.053,0.559-1.771,1.016-2.178 c-3.553-0.412-7.288-1.809-7.288-8.051c0-1.778,0.623-3.232,1.646-4.371c-0.164-0.412-0.713-2.068,0.157-4.311 c0,0,1.344-0.438,4.399,1.67c1.276-0.361,2.646-0.543,4.006-0.549c1.359,0.006,2.728,0.188,4.006,0.549 c3.056-2.108,4.396-1.67,4.396-1.67c0.873,2.242,0.323,3.898,0.159,4.311c1.024,1.139,1.644,2.593,1.644,4.371 c0,6.258-3.74,7.635-7.305,8.038c0.574,0.504,1.086,1.498,1.086,3.018c0,2.178-0.02,3.934-0.02,4.469 c0,0.436,0.288,0.941,1.101,0.783C27.421,29.7,32,23.598,32,16.403C32,7.406,24.837,0.112,16,0.112z" />
</svg>
</a>
</p>
</div>
<h1 class="align-self-center align-self-lg-start">surveyJS</h1>
<p class="claim">
JavaScript Survey. <br class="d-sm-none" />Made Easy
</p>
<p>
Create a fully-customizable survey and take advantage of <a href="https://github.com/SimplySayHi/formJS" target="_blank">formJS</a> superpowers.
<br />
Need only the survey? Try <span class="badge badge-pill badge-yellow">Lite</span> version.
</p>
<div>
<p class="d-inline-block mb-1">
Version
</p>
<div class="dropdown d-inline-block ml-1">
<button class="btn dropdown-toggle dropdown-red-outline py-0 px-2 bg-transparent" data-toggle="dropdown" type="button" data-print-current-version></button>
<span class="dropdown-menu w-100 py-1">
<a class="dropdown-item px-2" href="https://www.valeriodipunzio.com/plugins/surveyJS/3.0.2/" target="_blank">3.0.2</a>
<a class="dropdown-item px-2" href="https://www.valeriodipunzio.com/plugins/surveyJS/2.0.4/" target="_blank">2.0.4</a>
<a class="dropdown-item px-2" href="https://www.valeriodipunzio.com/plugins/surveyJS/1.6.1/" target="_blank">1.6.1</a>
</span>
</div>
</div>
<div class="mt-auto">
<div class="mt-3">
<p class="m-0">
Only 4.9KB ( <span class="badge badge-pill badge-yellow">Lite</span> version 3.7KB ) minified & gzipped
</p>
<p class="m-0">
Download
<a href="https://github.com/SimplySayHi/surveyJS/archive/master.zip">Latest Version</a> |
<a href="https://github.com/SimplySayHi/surveyJS/releases" target="_blank">All Releases</a>
</p>
</div>
</div>
</div>
<div id="demo" class="col-md-9 col-lg-6 col-xl-5 mx-auto panel-collapsible- mt-4">
<div class="card-body px-0 d-block">
<div class="surveyjs-wrapper surveyjs-custom-inputs panel" data-surveyjs-wrapper>
<div class="panel-body">
<form action="json/survey.json" name="surveyjs-form" class="surveyjs-form surveyjs-cards" data-surveyjs-form novalidate>
<div class="surveyjs-body questionsList stackSlider" data-surveyjs-body></div>
<div class="surveyjs-footer row">
<div class="surveyjs-question-wrapper text-right" data-formjs-question data-surveyjs-external="1">
<div class="surveyjs-answers-wrapper form-group">
<div class="text-left small" data-question></div>
<div class="form-check-inline abc-radio" data-answer>
<input class="form-check-input" name="surveyjs-answer-external" data-exclude-storage data-field/>
<label class="surveyjs-label form-check-label">
<span data-label></span>
</label>
</div>
<div class="form-check-inline abc-radio" data-answer>
<input class="form-check-input" name="surveyjs-answer-external" data-exclude-storage data-field/>
<label class="surveyjs-label form-check-label">
<span data-label></span>
</label>
</div>
</div>
<div class="surveyjs-errors-wrapper small">
To go on you must select an answer.
</div>
</div>
<button class="surveyjs-submit-btn btn btn-red d-block mx-auto" type="submit">
<span class="surveyjs-submit-text">SEND</span>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Browsers Support -->
<div id="browsers-support">
<h3 class="sticky-title">Browsers Support</h3>
<p>
surveyJS is compatible with ( desktop & mobile versions ):
</p>
<ul>
<li>
Chrome
</li>
<li>
Firefox
</li>
<li>
Internet Explorer 10+ / Edge <span class="text-yellow">*</span>
</li>
<li>
Safari 10+ <span class="text-yellow">*</span>
</li>
</ul>
<hr />
<p>
<span class="text-yellow">*</span> for compatibility with IE, old versions of Edge and/or other old browsers you may need to load some JS polyfills ( from <a href="https://polyfill.io" target="_blank">polyfill.io</a> or else ):<br />
<code>Array.from</code> <code>Element.prototype.closest</code> <code>Element.prototype.matches</code> <code>Promise</code> <code>Promise.prototype.finally</code> <code>AbortController</code> <code>fetch</code> <code>CustomEvent</code>
</p>
<pre>
<code class="language-html"><script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Array.from,Element.prototype.closest,Element.prototype.matches,Promise,Promise.prototype.finally,AbortController,fetch,CustomEvent"></script></code></pre>
</div>
<!-- Changelog -->
<div id="changelog">
<h3 class="sticky-title">Changelog</h3>
<ul class="p-0">
<li class="media my-3">
<div class="version-num text-red" data-print-current-version></div>
<div class="media-body pl-2">
<ul>
<li>
Update survey init as per formjs-plugin v5.4.0 internal update of "initialValues"
</li>
</ul>
</div>
</li>
</ul>
<div class="toggable-content-outer">
<input type="checkbox" class="fake-checkbox btn-toggable-content" id="changelog-show-more" />
<label class="toggable-label text-red" for="changelog-show-more">
<span>Show more</span>
<span>Close</span>
</label>
<div class="toggable-content">
<ul class="p-0">
<li class="media my-3">
<div class="version-num text-red">4.0.1</div>
<div class="media-body pl-2">
<ul>
<li>
Add eslint to dev dependencies
</li>
<li>
Fix issue of not imported dependency in validationEnd
</li>
<li>
Minor improvements
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">4.0.0</div>
<div class="media-body pl-2">
<ul>
<li>
Added method "destroy" to Lite version
</li>
<li>
Updated dependency: formJS v5.2.0+ ( full version only )
</li>
<li>
Switched usage of JS Event with CustomEvent
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">3.0.2</div>
<div class="media-body pl-2">
<ul>
<li>
Exported main versions as UMD instead of IIFE for better environments compatibility
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">3.0.1</div>
<div class="media-body pl-2">
<ul>
<li>
Fixed bug on fetch response not ok on ajax call during initalization
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">3.0.0</div>
<div class="media-body pl-2">
<ul>
<li>
Added Lite version
</li>
<li>
Huge refactoring of survey creation and related options
</li>
<li>
Survey class now extends Form class so it inherits all features
</li>
<li>
Updated dependency: formJS v4.3.0+
</li>
<li>
Switched bundler, from Webpack to Rollup and exported lib also as ES & SystemJS Modules
</li>
<li>
Switched "useLocalStorage" with "useWebStorage" option in "options". Now using session storage instead of local storage
</li>
<li>
Removed "hidden-privacy" in JSON data, and added "external": true, to set external questions
</li>
<li>
Removed method "init". It now runs inside instance call and emits event
</li>
<li>
Removed options.fieldOptions.validateOnEvents since it uses formJS default value
</li>
<li>
Removed some props from instance "internals"
</li>
<li>
Removed title and subtitle from JSON data and core functionality ( can be done manually )
</li>
<li>
Minor improvements and bugfixes
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">2.0.4</div>
<div class="media-body pl-2">
<ul>
<li>
Updated dev dependencies
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">2.0.3</div>
<div class="media-body pl-2">
<ul>
<li>
Updated dependency: formJS 3.3.2 ( new options are available )
</li>
<li>
Minor improvements
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">2.0.2</div>
<div class="media-body pl-2">
<ul>
<li>
Minor code improvements.
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">2.0.1</div>
<div class="media-body pl-2">
<ul>
<li>
Project published on NPM.
</li>
<li>
Updated webpack config to export library as UMD Module.
</li>
<li>
Updated dependency: formJS 3.1.2
</li>
<li>
Removed "SurveyJS" as alternative namespace.
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">2.0.0</div>
<div class="media-body pl-2">
<ul>
<li>
Rewritten with ES6
</li>
<li>
Added possibility to set "subtype" in JSON file to enable "data-subtype" attribute on input fields and take advantage of formJS custom validations.
</li>
<li>
Added possibility to set "validateIfFilled" in JSON file to enable "data-validate-if-filled" attribute on input fields as per formJS spec.
</li>
<li>
Updated dependency: formJS 3.1.0
</li>
<li>
Bugfix and improvements
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">1.6.1</div>
<div class="media-body pl-2">
<ul>
<li>
Updated dependency: formJS 2.3.3
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">1.6.0</div>
<div class="media-body pl-2">
<ul>
<li>
Updated dependency: formJS 2.3.2 - Survey validation and submit is now automatically handled via formJS initialization.
</li>
<li>
Updated dependency: Bootstrap 4 CSS.
</li>
<li>
Renamed option "setJSONurl" with "url".
</li>
<li>
Added "useLocalStorage" option in "options".
</li>
<li>
Added "cssClasses" in "options".
</li>
<li>
Added support for "maxlength" ( number ) in JSON file. For textareas, the value will make the plugin add maxlength attribute with the specified value.
</li>
<li>
Changed attribute "data-max-check" with "data-checks" ( "checks" in JSON file ) as for new formJS version.
</li>
<li>
Changed some CSS classes in default HTML templates.
</li>
<li>
Changed some CSS classes related to the survey graphic.
</li>
<li>
Moved all ( or almost all ) the template string options in "templates".
</li>
<li>
Moved "beforeSend", "onSubmitComplete", "onSubmitError", "onSubmitSuccess" in "formOptions" as for formJS plugin.
</li>
<li>
Moved "onValidation" in "fieldOptions" as for formJS plugin.
</li>
<li>
Removed "graphicInput" option in "options".
</li>
<li>
Bugfix & many changes under the hood.
</li>
</ul>
</div>
</li>
<li class="media my-3">
<div class="version-num text-red">1.5.2</div>
<div class="media-body pl-2">
First stable version ( with formJS v1.2.0 )
</div>
</li>
</ul>
</div>
</div>
</div>
<!-- Bugs -->
<div id="bugs">
<h3 class="sticky-title">Bugs</h3>
<p>
If you find a bug, please report it <a href="https://github.com/SimplySayHi/surveyJS/issues" target="_blank">here</a>
</p>
</div>
<footer class="text-center mt-5 pt-5 mb-3">
<hr />
<p class="small m-0">
Made with passion by <a href="https://valeriodipunzio.com" target="_blank">Valerio Di Punzio</a>
</p>
</footer>
</div>
</body>
</html>