我有一个包含项目和按钮“添加”的表单,用于将字段动态添加到表单(复制第一个字段)。链接到按钮的功能是什么这是我的代码:
var form new Ext.form.FormPanel({
items : [{
xtype: 'fieldcontainer',
combineErrors: true,
msgTarget : 'side',
layout: 'hbox',
items: [{
xtype : 'displayfield',
margin : '0 10 0 0'
},{
xtype : 'button',
text : 'select'
}]
}]
,buttons: [{
text : 'Add field'
}]
})