Thanks for the response! I am having another issue though. I have been going through all the Intro videos and piecing my app together that way, since I am new to this. So i have the Viewport thing going. There is the app.js which launchs the Viewport.js. And from this Viewport i have my tabPanel and items with xtypes to a seperate card.
Here is my code of one of the cards where i want to call the function:
Code:
ToolbarDemo.views.Testcard = Ext.extend(Ext.form.FormPanel, {
scroll: 'vertical',
id: 'hform',
items: [
{
xtype: 'fieldset',
title: 'Details',
defaults: {
labelWidth: '35%'
},
items: [{
xtype: 'textfield',
name : 'fname',
label: 'First Name',
required: true
},{
xtype: 'textfield',
name : 'lname',
label: 'Last Name',
required: true
},{
xtype: 'textfield',
name : 'pnumber',
label: 'Phone Number',
required: true
},{
xtype: 'textfield',
name : 'date',
label: 'Date'
}],
},{
layout: 'vbox',
defaults: {xtype: 'button', flex: 1, style: 'margin: .5em;'},
items: [{
text: 'Clear',
scope: this,
handler: function(){
Ext.getCmp('hform').reset();
}
},{
xtype: 'button',
text: 'Submit'
}
],
},]
});
Ext.reg('testcard', ToolbarDemo.views.Testcard);
I am confused as to where i can put this function...i notice the handler function with the Clear button as far as adding a function there but no dice.
any help would be appreciated...and should i avoid using the Viewport style and instead create variables as panels?