Code:
App.views.HomeJoin = Ext.extend(Ext.form.FormPanel, {
title: "Join Now",
name: "myForm",
id: "myForm",
dockedItems: [
{xtype:'toolbar', title:'<div id="topBar-theme"><a href="" class="topLogo-Theme"> </a><span class="topPhotos-theme"> </span></div>'},
{
xtype:'toolbar',
dock: 'bottom',
items: [
{xtype: 'spacer'},
{
xtype:'button',
ui:'confirm',
width:'25%',
text:'Login',
align:'center',
handler:function() {
var form = App.views.HomeJoin.getValues();
Ext.Msg.alert('Data:-> ' + form.username);
}
},
]}
],
html: '<div class="animatedBanner-theme"> </div>',
items: [{
scroll: 'vertical',
width: 320,
height: hfixA,
autoHeight: true,
defaults: {width: 290, height: 10, xtype: 'textfield', styleHtmlContent: true},
items: [
{
defaults: { labelWidth: '35%' },
xtype: 'fieldset',
title: 'Registration Form',
instructions: 'Please enter the information above.',
items: [
{
inputType: 'hidden',
id: 'someId-A',
name: 'someNa-A',
value: 'someVa-A',
},
{
inputType: 'hidden',
id: 'someId-B',
name: 'someNa-B',
value: 'someVa-B',
},
{
inputType: 'hidden',
id: 'someId-C',
name: 'someNa-C',
value: 'someVa-C',
},
{
label: 'Username',
name: 'username',
xtype: 'textfield',
autoCapitalize: 'false',
allowBlank: 'false',
required: 'true',
},
{
label: 'Password',
name: 'password',
xtype: 'passwordfield',
autoCapitalize: 'false',
allowBlank: 'false',
required: 'true',
},
{
label: 'Email',
name: 'email',
xtype: 'emailfield',
autoCapitalize: 'false',
allowBlank: 'false',
required: 'true',
},
{
label: 'Zip',
name: 'zipcode',
xtype: 'numberfield',
autoCapitalize: 'false',
allowBlank: 'false',
required: 'true',
},
{
label: 'Country',
name: 'country',
xtype: 'selectfield',
required: 'true',
options: [
{text: 'United States', value: 'US'},
{text: 'Canada', value: 'CA'},
{text: 'United Kingdom', value: 'GB'},
]
},
]
},
{
xtype: 'fieldset',
title: 'Choose A Membership',
instructions: '2 Day Pass ($1.00) <br /> 30 Days Pass ($39.95)',
allowBlank: 'false',
required: 'true',
defaults: { xtype: 'radiofield', labelWidth: '35%' },
items: [
{
name: 'membership',
value: '134',
label: '2 Days Pass',
},
{
name: 'membership',
value: '98',
label: '30 Days Pass',
},
]
},
{
xtype: 'fieldset',
title: 'Payment',
instructions: 'Choose A Payment Type Above',
required: 'true',
defaults: { xtype: 'radiofield', labelWidth: '35%' },
items: [
{
name: 'paymenttype',
value: 'CC',
label: 'Credit Card',
},
{
name: 'paymenttype',
value: 'CH',
label: 'Check',
},
]
},
],
}]
});
Ext.reg('HomeJoin', App.views.HomeJoin);
If I use the following I can get the values for each field.