5 Ext.onReady(function() {
9 function showContactForm() {
11 var form = Ext.widget('form', {
22 labelStyle: 'font-weight:bold'
29 xtype: 'fieldcontainer',
30 fieldLabel: 'Your Name',
31 labelStyle: 'font-weight:bold;padding:0',
33 defaultType: 'textfield',
46 name: 'middleInitial',
58 fieldLabel: 'Your Email Address',
63 fieldLabel: 'Subject',
66 xtype: 'textareafield',
67 fieldLabel: 'Message',
77 this.up('form').getForm().reset();
78 this.up('window').hide();
83 if (this.up('form').getForm().isValid()) {
84 // In a real application, this would submit the form to the configured url
85 // this.up('form').getForm().submit();
86 this.up('form').getForm().reset();
87 this.up('window').hide();
88 Ext.MessageBox.alert('Thank you!', 'Your inquiry has been sent. We will respond as soon as possible.');
94 win = Ext.widget('window', {
109 var mainPanel = Ext.widget('panel', {
110 renderTo: Ext.getBody(),
117 html: 'Thank you for visiting our site! We welcome your feedback; please click the button below to ' +
118 'send us a message. We will respond to your inquiry as quickly as possible.',
119 style: 'margin-bottom: 20px;'
122 style: 'text-align:center',
128 handler: showContactForm