PDA

View Full Version : Checkbox group with textbox



chetan.nellekeri
23 Aug 2013, 9:58 PM
Hi, I want to create a checkbox group for which one checkbox should contain a textbox.. Something like below.45517

scottmartin
24 Aug 2013, 12:11 PM
Have a look at: (same premise)
http://www.sencha.com/forum/showthread.php?242007

chetan.nellekeri
24 Aug 2013, 10:35 PM
I got " do not have permission to access this page" error..
45526

scottmartin
25 Aug 2013, 6:22 AM
Here is the post .. It uses radio, but you get the idea.



Ext.require('*');

Ext.onReady(function() {

var panel = Ext.create('Ext.container.Container', {
renderTo: Ext.getBody(),
items: [{
xtype: 'radiogroup',
fieldLabel: 'Select',
columns: 1,
vertical: true,
items: [{
boxLabel: 'Value 1',
inputValue: '1',
checked: true,
name: 'inputname',
listeners: {
change: function(field, newValue, oldValue) {
if (newValue) panel.down('textfield').hide();
}
}
}, {
boxLabel: 'Other',
inputValue: '2',
name: 'inputname',
listeners: {
change: function(field, newValue, oldValue) {
if (newValue) panel.down('textfield').show();
}
}
}]
}, {
xtype: 'textfield',
hidden: true, // or use disabled; and set enable(),disable()
fieldLabel: 'My Text'
}]
});

});

chetan.nellekeri
25 Aug 2013, 8:47 PM
Thanks Scott