Is that enough for you? Or I can continue to get specific record based on the ComponentQuery
!
Here is the Fiddle : Get selected radio values
Ext.create('Ext.form.Panel', {
title: 'RadioGroup Example',
id: 'form-panel',
width: 300,
height: 200,
bodyPadding: 10,
renderTo: Ext.getBody(),
items:[
{
xtype: 'radiogroup',
fieldLabel: 'Group One',
// Arrange radio buttons into two columns, distributed vertically
columns: 2,
vertical: true,
items: [
{ boxLabel: 'Item 1', name: 'rb', inputValue: '1' },
{ boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
{ boxLabel: 'Item 3', name: 'rb', inputValue: '3' },
{ boxLabel: 'Item 4', name: 'rb', inputValue: '4' },
{ boxLabel: 'Item 5', name: 'rb', inputValue: '5' },
{ boxLabel: 'Item 6', name: 'rb', inputValue: '6' }
]
},
{
xtype: 'radiogroup',
fieldLabel: 'Group Two',
// Arrange radio buttons into two columns, distributed vertically
columns: 2,
vertical: true,
items: [
{ boxLabel: 'Item 1', name: 'cb', inputValue: '1' },
{ boxLabel: 'Item 2', name: 'cb', inputValue: '2' },
{ boxLabel: 'Item 3', name: 'cb', inputValue: '3' },
{ boxLabel: 'Item 4', name: 'cb', inputValue: '4' },
{ boxLabel: 'Item 5', name: 'cb', inputValue: '5' },
{ boxLabel: 'Item 6', name: 'cb', inputValue: '6', checked: true }
],
listeners: {
change: function() {
var fp = Ext.getCmp('form-panel');
var out = Ext.ComponentQuery.query('radio');
Ext.Array.each(out, function(rb) {
if (rb.checked === true) {
console.log(rb.inputValue);
}
})
}
}
}
]
});