forked from vitmalina/w2ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforms-4.html
105 lines (102 loc) · 3.99 KB
/
forms-4.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
<div class="content">
<div id="example_title">
<h1>Multi Page Form</h1>
This is exactly the same form as in the previous example, but in this case the form is presented in three pages.
Click on the page link to switch pages.
</div>
<div id="example_view"></div>
<div id="example_code"></div>
</div>
<!--CODE-->
<a href="javascript: w2ui.form.goto(0);" style="padding-right: 10px">Page 1</a> |
<a href="javascript: w2ui.form.goto(1);" style="padding: 10px">Page 2</a> |
<a href="javascript: w2ui.form.goto(2);" style="padding: 10px">Page 3</a>
<div style="height: 10px;"></div>
<div id="form" style="width: 750px;">
<div class="w2ui-page page-0">
<div class="w2ui-label w2ui-span5">First Name:</div>
<div class="w2ui-field w2ui-span5">
<input name="first_name" type="text" maxlength="100" size="40"/>
</div>
<div class="w2ui-label w2ui-span5">Last Name:</div>
<div class="w2ui-field w2ui-span5">
<input name="last_name" type="text" maxlength="100" size="40"/>
</div>
<div class="w2ui-label w2ui-span5">Comments:</div>
<div class="w2ui-field w2ui-span5">
<textarea name="comments" type="text" style="width: 100%; height: 80px; resize: none"></textarea>
</div>
</div>
<div class="w2ui-page page-1">
<div class="w2ui-label">Address Line 1:</div>
<div class="w2ui-field">
<input name="address1" type="text" maxlength="100" size="60"/>
</div>
<div class="w2ui-label">Address Line 2:</div>
<div class="w2ui-field">
<input name="address2" type="text" maxlength="100" size="60"/>
</div>
<div class="w2ui-label">City:</div>
<div class="w2ui-field">
<input name="city" type="text" maxlength="50" size="30"/>
</div>
<div class="w2ui-label">State:</div>
<div class="w2ui-field">
<input name="state" type="text" maxlength="2" size="2"/>
</div>
<div class="w2ui-label">Zip:</div>
<div class="w2ui-field">
<input name="zip" type="text" maxlength="10" size="10"/>
</div>
</div>
<div class="w2ui-page page-2">
<div class="w2ui-label">Talk Name:</div>
<div class="w2ui-field">
<input name="talk_name" type="text" maxlength="100" style="width: 90%"/>
</div>
<div class="w2ui-label">Talk Description:</div>
<div class="w2ui-field">
<textarea name="description" type="text" style="width: 90%; height: 80px; resize: none"></textarea>
</div>
<div style="height: 30px"></div>
<div class="w2ui-label">Short Bio:</div>
<div class="w2ui-field">
<textarea name="short_bio" type="text" style="width: 90%; height: 80px; resize: none"></textarea>
</div>
</div>
<div class="w2ui-buttons">
<input type="button" value="Reset" name="reset">
<input type="button" value="Save" name="save">
</div>
</div>
<!--CODE-->
<script>
$(function () {
$('#form').w2form({
name : 'form',
header : 'Multi Page Form',
url : 'server/post',
fields: [
{ name: 'first_name', type: 'text', required: true },
{ name: 'last_name', type: 'text', required: true },
{ name: 'comments', type: 'text'},
{ name: 'address1', type: 'text', required: true },
{ name: 'address2', type: 'text' },
{ name: 'city', type: 'text', required: true },
{ name: 'state', type: 'text', required: true },
{ name: 'zip', type: 'int', required: true },
{ name: 'short_bio', type: 'text' },
{ name: 'talk_name', type: 'text', required: true },
{ name: 'description', type: 'text' }
],
actions: {
reset: function () {
this.clear();
},
save: function () {
this.save();
}
}
});
});
</script>