Last active
August 29, 2015 14:02
-
-
Save MikeTatsky/1c67697b0c6bf80ff763 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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