forked from knipknap/SpiffForm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.js
28 lines (22 loc) · 939 Bytes
/
form.js
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
function attach_form(container) {
var form = new SpiffForm(container);
form.set_title('Feedback Form Demo');
form.set_subtitle('Let us know what you think!');
var choose = form.append(new SpiffFormDropdownList());
choose.set_label('Complaint type');
choose.add_option('');
choose.add_option('Customer service');
choose.select(1);
var datepicker = form.append(new SpiffFormDatePicker());
datepicker.set_label('Birth Date');
form.append(new SpiffFormPartsField());
var entry = form.append(new SpiffFormEntryField());
entry.set_label('Complaint summary');
entry.set_text('Stop sending me emails');
var textbox = form.append(new SpiffFormTextArea());
textbox.set_label('Irrelevant text');
textbox.set_text('For the love of Jebus');
var checkbox = form.append(new SpiffFormCheckbox());
checkbox.set_label('Please send more spam to my inbox');
return form;
}