ラジオグループで選択したラジオボタンの値にアクセスするのに苦労しています。フォーラムや Web 上の他の投稿での議論に基づいて、さまざまなアプローチを試みました。残念ながら、それを機能させるのに十分な幸運 (またはスキル) がありませんでした。次の FormPanel 構成に基づいて、グループ「mainPhone」で選択したラジオの値を取得する方法を誰かが教えてくれることを期待していました。
ありがとう!
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
})
]}]});
}