adibhagra
30 Sep 2009, 3:49 AM
hey all,
i have a form that i am using within my panel , i have used xtype in order to create this form, i wish to now submit this form via button,but since i dont have a variable to which my form is assigned i cant use var_name.getForm().submit(), can someone please tell me what i can do now . my code is as follows:
items:[{
xtype:'form',
url:'/kohana/index.php/manage/get_violations' (http://www.extjs.com/forum/'/kohana/index.php/manage/get_violations'),
title:'Reporting',
height:300,
anchor:'100%',
bodyStyle:'padding:5px;',
defaultType:'textfield',
items:[{
xtype:'combo',
name:'site',
fieldLabel:'Site',
store: store,
displayField:'site',
mode:'local',
width:94
},
{
xtype:'datefield',
fieldLabel:'Start Date',
name:'sdate'
},{
xtype:'datefield',
fieldLabel:'End Date',
name:'edate'
},{
xtype:'combo',
name:'show_violations',
mode:'local',
store:new Ext.data.SimpleStore({
fields:['violations'],
data:[['Completed'],['In Progress'],['All']]
}),
displayField:'violations',
width:94,
fieldLabel:'Violations'
},
{
xtype:'button',
text:'Submit',
handlers:function(){
// want to submit my form from here
// how do i access this form
}
}]
thanks and regards,
ice
i have a form that i am using within my panel , i have used xtype in order to create this form, i wish to now submit this form via button,but since i dont have a variable to which my form is assigned i cant use var_name.getForm().submit(), can someone please tell me what i can do now . my code is as follows:
items:[{
xtype:'form',
url:'/kohana/index.php/manage/get_violations' (http://www.extjs.com/forum/'/kohana/index.php/manage/get_violations'),
title:'Reporting',
height:300,
anchor:'100%',
bodyStyle:'padding:5px;',
defaultType:'textfield',
items:[{
xtype:'combo',
name:'site',
fieldLabel:'Site',
store: store,
displayField:'site',
mode:'local',
width:94
},
{
xtype:'datefield',
fieldLabel:'Start Date',
name:'sdate'
},{
xtype:'datefield',
fieldLabel:'End Date',
name:'edate'
},{
xtype:'combo',
name:'show_violations',
mode:'local',
store:new Ext.data.SimpleStore({
fields:['violations'],
data:[['Completed'],['In Progress'],['All']]
}),
displayField:'violations',
width:94,
fieldLabel:'Violations'
},
{
xtype:'button',
text:'Submit',
handlers:function(){
// want to submit my form from here
// how do i access this form
}
}]
thanks and regards,
ice