Skip to content

Instantly share code, notes, and snippets.

@MikeTatsky
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeTatsky/1c67697b0c6bf80ff763 to your computer and use it in GitHub Desktop.
Save MikeTatsky/1c67697b0c6bf80ff763 to your computer and use it in GitHub Desktop.
new ZG.Form({
id: 'zg-form',
renderTo: 'container',
style: {
'float': 'left'
},
items: [{
type: 'string',
value: 'Ted',
labelText: 'Name',
name: 'name'
},{
type: 'string',
value: 'Smith',
labelText: 'Sur Name',
name: 'surname'
},{
type: 'number',
value: 25,
minValue: 0,
maxValue: 100,
labelText: 'Age',
name: 'age'
},{
type: 'date',
value: '8.11.1988',
labelText: 'Birth day',
name: 'date'
},{
type: 'checkbox',
value: false,
labelText: 'CheckBox',
name: 'checkbox1'
},{
type: 'checkbox',
value: true,
labelText: 'CheckBox',
name: 'checkbox2'
},{
type: 'combo',
value: 0,
showField: 'text',
labelText: 'Company',
name: 'company',
items: [{
text: 'Item 1'
},{
text: 'Item 2'
},{
text: 'Item 3'
}],
listeners: [{
change: function(combo, o){
}
}]
},{
type: 'number',
value: 80000,
minValue: 0,
maxValue: 200000,
labelText: 'Salary',
step: 100,
name: 'salary'
},{
type: 'number',
value: 50,
minValue: 0,
maxValue: 100,
labelText: 'Hour Rate',
name: 'hourrate'
},{
type: 'textarea',
value: 'Some text',
labelText: 'About',
name: 'about'
}],
buttons: [{
text: 'Close',
handler: function(){
console.log('close');
}
},{
text: 'Apply',
handler: function(){
console.log('apply');
}
}]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment