Javascript extjs 4.2.1-Radiogroup:添加带有文本框的单选按钮
在我的UI中,我有一个单独的select RadioGroup,其中有几个选项可供选择。其中一个选项将包含一个文本字段,用户可以这样输入:Javascript extjs 4.2.1-Radiogroup:添加带有文本框的单选按钮,javascript,html,css,extjs,extjs4.2,Javascript,Html,Css,Extjs,Extjs4.2,在我的UI中,我有一个单独的select RadioGroup,其中有几个选项可供选择。其中一个选项将包含一个文本字段,用户可以这样输入: () Option A () Option B () Other (Please specify) ____ 如何将此类内容添加到放射组?要创建“其他”选项的布局,您可以将组件与布局一起使用。此组件将有两项。第一项为,第二项为 用于在可使用的收音机和文本字段组件之间创建空间 摆弄实时示例:这样做,您在设置radiogroup的值时会遇到问题,因为其setV
() Option A
() Option B
() Other (Please specify) ____
如何将此类内容添加到放射组?要创建“其他”选项的布局,您可以将组件与布局一起使用。此组件将有两项。第一项为,第二项为
用于在可使用的收音机
和文本字段
组件之间创建空间
摆弄实时示例:这样做,您在设置radiogroup的值时会遇到问题,因为其setValue方法要求其子项都是radiofields。因此,您必须覆盖radiogroup setValue方法以满足您的需要。
{
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'
}
]
}
]
}