For creating layout of "Other" option you can use container
component with hbox
layout. This component will have two items. First item will be radio
and the second item will be textfield
.
For creating space between radio
and textfield
components you can use splitter
.
{
xtype: 'radiogroup',
fieldLabel: 'Choose',
columns: 1,
vertical: true,
items: [
{ boxLabel: 'Option 1', name: 'rb', inputValue: '1' },
{ boxLabel: 'Option 2', name: 'rb', inputValue: '2' },
{
xtype: 'container',
layout: 'hbox',
items: [
{
xtype: 'radio',
boxLabel: 'Other (Please specify)',
name: 'rb',
inputValue: '3'
},
{
xtype: 'splitter'
},
{
xtype: 'textfield',
name: 'option3detail'
}
]
}
]
}
Fiddle with live example: https://fiddle.sencha.com/#fiddle/2kj