-
Notifications
You must be signed in to change notification settings - Fork 488
/
mobile_friendly.html
97 lines (89 loc) · 2.35 KB
/
mobile_friendly.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
<!doctype html>
<html>
<head>
<title>Form Builder</title>
<meta name="description" content="">
<link rel="stylesheet" href="vendor/css/vendor.css" />
<link rel="stylesheet" href="dist/formbuilder.css" />
<style>
* {
box-sizing: border-box;
}
body {
background-color: #444;
font-family: sans-serif;
}
.fb-main {
background-color: #fff;
border-radius: 5px;
min-height: 600px;
}
input[type=text] {
height: 26px;
margin-bottom: 3px;
}
select {
margin-bottom: 5px;
font-size: 40px;
}
</style>
</head>
<body>
<div class='fb-main'></div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min.js"></script>
<script src="vendor/js/vendor_mobile_friendly.js"></script>
<script src="dist/formbuilder.js"></script>
<script>
$(function(){
fb = new Formbuilder({
selector: '.fb-main',
bootstrapData: [
{
"label": "Do you have a website?",
"field_type": "website",
"required": false,
"field_options": {},
"cid": "c1"
},
{
"label": "Please enter your clearance number",
"field_type": "text",
"required": true,
"field_options": {},
"cid": "c6"
},
{
"label": "Security personnel #82?",
"field_type": "radio",
"required": true,
"field_options": {
"options": [{
"label": "Yes",
"checked": false
}, {
"label": "No",
"checked": false
}],
"include_other_option": true
},
"cid": "c10"
},
{
"label": "Medical history",
"field_type": "file",
"required": true,
"field_options": {},
"cid": "c14"
}
]
});
fb.on('save', function(payload){
console.log(payload);
})
});
</script>
</body>
</html>