Created
August 31, 2012 14:00
-
-
Save hoverlover/3553045 to your computer and use it in GitHub Desktop.
Dynamically add fieldset to sencha FormPanel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.views.creditCardForm.items.items[0].up('form').insert(1, { | |
xtype: 'fieldset', | |
id: 'customerInfoFormFieldset', | |
title: 'Name and Address Details', | |
instructions: 'Please enter your name and address.', | |
defaults: { | |
xtype: 'textfield', | |
labelAlign: 'left', | |
labelWidth: '40%', | |
required: false, | |
useClearIcon: true, | |
autoCapitalize : false | |
}, | |
items: [ | |
{ | |
name : 'name', | |
label: 'Name', | |
autoCapitalize : true | |
}, | |
{ | |
xtype: 'App.views.ErrorField', | |
fieldname: 'name' | |
}, | |
{ | |
name : 'address', | |
label: 'Address' | |
}, | |
{ | |
xtype: 'App.views.ErrorField', | |
fieldname: 'address' | |
}, | |
{ | |
name : 'city', | |
label: 'City', | |
autoCapitalize : true | |
}, | |
{ | |
xtype: 'App.views.ErrorField', | |
fieldname: 'city' | |
}, | |
{ | |
name : 'state', | |
label: 'State', | |
autoCapitalize : true | |
}, | |
{ | |
xtype: 'App.views.ErrorField', | |
fieldname: 'state' | |
}, | |
{ | |
name : 'zip', | |
label: 'Zip', | |
}, | |
{ | |
xtype: 'App.views.ErrorField', | |
fieldname: 'zip' | |
} | |
] | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment