X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/examples/form/field-types.js diff --git a/examples/form/field-types.js b/examples/form/field-types.js new file mode 100644 index 00000000..7854b0fe --- /dev/null +++ b/examples/form/field-types.js @@ -0,0 +1,84 @@ +Ext.require([ + 'Ext.form.*' +]); + +Ext.onReady(function() { + + var formPanel = Ext.create('Ext.form.Panel', { + frame: true, + title: 'Form Fields', + width: 340, + bodyPadding: 5, + + fieldDefaults: { + labelAlign: 'left', + labelWidth: 90, + anchor: '100%' + }, + + items: [{ + xtype: 'textfield', + name: 'textfield1', + fieldLabel: 'Text field', + value: 'Text field value' + }, { + xtype: 'textfield', + name: 'password1', + inputType: 'password', + fieldLabel: 'Password field' + }, { + xtype: 'filefield', + name: 'file1', + fieldLabel: 'File upload' + }, { + xtype: 'textareafield', + name: 'textarea1', + fieldLabel: 'TextArea', + value: 'Textarea value' + }, { + xtype: 'displayfield', + name: 'displayfield1', + fieldLabel: 'Display field', + value: 'Display field value' + }, { + xtype: 'numberfield', + name: 'numberfield1', + fieldLabel: 'Number field', + value: 5, + minValue: 0, + maxValue: 50 + }, { + xtype: 'checkboxfield', + name: 'checkbox1', + fieldLabel: 'Checkbox', + boxLabel: 'box label' + }, { + xtype: 'radiofield', + name: 'radio1', + value: 'radiovalue1', + fieldLabel: 'Radio buttons', + boxLabel: 'radio 1' + }, { + xtype: 'radiofield', + name: 'radio1', + value: 'radiovalue2', + fieldLabel: '', + labelSeparator: '', + hideEmptyLabel: false, + boxLabel: 'radio 2' + }, { + xtype: 'datefield', + name: 'date1', + fieldLabel: 'Date Field' + }, { + xtype: 'timefield', + name: 'time1', + fieldLabel: 'Time Field', + minValue: '1:30 AM', + maxValue: '9:15 PM' + }] + }); + + formPanel.render('form-ct'); + +});