In a series of receiving elements of the dynamic form. After some of these elements, I need to add plug-in. Ie first went to the field, such as input, and automatically added after a new xtype. Tried createChild, but for some reason he swears by xtype.
Asked
Active
Viewed 143 times
1 Answers
2
var formPanel = new Ext.form.FormPanel({
title: 'Test Form',
labelWidth: 120,
width: 350,
padding: 10,
tbar: [{
text: 'Add Item',
handler: function () {
formPanel.add({
xtype: 'textfield',
fieldLabel: 'My TextBox'
});
formPanel.doLayout();
}
}],
renderTo: 'output'
});
Demo here http://ext4all.com/post/extjs-3-how-to-add-a-new-field-dynamically

khmurach
- 484
- 4
- 10