dutch-form.js
1.75 KB
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
/*
* Ext JS Library 1.1 Beta 1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.onReady(function(){
Ext.QuickTips.init();
// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';
var fs = new Ext.form.Form({
labelAlign: 'right',
labelWidth: 95
});
fs.fieldset(
{legend:'Contact Informatie'},
new Ext.form.TextField({
fieldLabel: 'Voornaam',
name: 'first',
width:190
}),
new Ext.form.TextField({
fieldLabel: 'Achternaam',
name: 'last',
width:190
}),
new Ext.form.TextField({
fieldLabel: 'Bedrijf',
name: 'company',
width:190
}),
new Ext.form.TextField({
fieldLabel: 'E-mail',
name: 'email',
vtype:'email',
width:190
}),
new Ext.form.ComboBox({
fieldLabel: 'Provincie',
hiddenName: 'state',
store: new Ext.data.SimpleStore({
fields: ['province'],
data : Ext.exampledata.dutch_provinces // from dutch-provinces.js
}),
displayField: 'province',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Kies uw provincie...',
selectOnFocus:true,
width:190
}),
new Ext.form.DateField({
fieldLabel: 'Geboorte datum',
name: 'dob',
width:190,
allowBlank:false
})
);
fs.addButton('Opslaan');
fs.addButton('Annuleren');
fs.render('form-ct');
});