我有一些困难访问在radiogroup中选定的单选按钮的值。基于论坛和网络上其他帖子的讨论,我尝试了许多不同的方法。不幸的是,运气不够好(或熟练)。基于下面的FormPanel配置,我希望有人能够告诉我如何获得组中'mainPhone'中选定电台的值。Ext RadioGroup - 如何访问所选单选按钮的值?
谢谢!
想要更新以表明我能够从stackoverflow获得响应,而EXT-JS论坛没有提供任何帮助。方法去stackoverflow!
马特
function createForm(elem) {
var myForm2 = new Ext.form.FormPanel({
renderTo:elem,
width:425,
frame:true,
style:"margin: 10px auto 10px auto;",
items: [{xtype:'fieldset',
title: 'Contact Info',
autoHeight:true,
items :[new Ext.form.RadioGroup({
fieldLabel: 'Main Phone',
vertical: false,
id:"mainPhone",
items: [
{boxLabel: 'Home', name: 'id-1', inputValue: 'H', checked:true},
{boxLabel: 'Work', name: 'id-1', inputValue: 'W'},
{boxLabel: 'Other', name: 'id-1', inputValue: 'O'}
]
}),
new Ext.form.TextField({
id:"frm_CreateCustomerHomePhone",
fieldLabel:"Home Phone",
width:275,
allowBlank:true
}),
new Ext.form.TextField({
id:"frm_CreateCustomerWorkPhone",
fieldLabel:"Work Phone",
width:275,
allowBlank:true
})
new Ext.form.TextField({
id:"frm_CreateCustomerOtherPhone",
fieldLabel:"Other Phone",
width:275,
allowBlank:true
})
]}]});
}
这一个做到了!非常感谢 – Matty 2009-01-06 14:05:33