1.文本域:textfield
{
xtype: 'textfield',
fieldLabel: 'Text field'
}
2.文本区域:textarea
{
xtype: 'textarea',
fieldLabel: 'Text Area'
}
3.显示字段:displayfield
{
xtype: 'displayfield',
fieldLabel: 'Display Field''
}
4.日期字段:datefield
{
xtype: 'datefield',
fieldLabel: 'Date picker'
}
5.按钮:button
{
xtype: 'button',
text : 'Button'
}
6.单选:radiogroup
xtype: 'radiogroup',
fieldLabel: '性别',
items: [{
boxLabel: '男',
inputValue: '0'
}, , {
boxLabel: '女',
inputValue: '1'
}],
7.多选:checkboxfield
8.下拉列表:combobox
{
xtype: 'combo',
fieldLabel: '专业',
store: [
['Shade', 'Shade'],
['Mostly Shady', 'Mostly Shady'],
['Sun or Shade', 'Sun or Shade'],
['Mostly Sunny', 'Mostly Sunny'],
['Sunny', 'Sunny']
]
}
9.时间字段:timefield 可以预定义最大和最小时间值
{
xtype: 'timefield',
fieldLabel: 'Time field',
minValue: '6:00 AM',
maxValue: '8:00 PM',
increment: 30,
anchor: '100%'
}
10.文件:filefield 可以浏览和上传文件
{
xtype: 'filefield',
fieldLabel: 'File field',
labelWidth: 50,
msgTarget: 'side',
allowBlank: false,
anchor: '100%',
buttonText: 'Select File...'
}
11.微调字段:spinnerfield
{
xtype: 'spinnerfield',
fieldLabel: 'Spinner field'
}
12.数字字段:numberfield
{
xtype: 'numberfield',
anchor: '100%',
fieldLabel: 'Numeric field',
maxValue: 99,
minValue: 0
}
13.隐藏字段 hiddenfield
{
xtype: 'hiddenfield',
value: 'value from hidden field'
}