PDA

View Full Version : form not submitting



dvuja2
14 Nov 2009, 4:44 AM
var searchForm = new Ext.FormPanel(
{
url:'getData.php',
frame: true,
defaults : {
animCollapse: true,
xtype: 'fieldset',
collapsed: true,
layout: 'form',
anchor: '100%',
collapsible: true,
titleCollapse: true
},
items: [
{
title: ' Agents '.localize(),
labelWidth: 50,
defaults: {
anchor: '-17'
},
items: [
{
xtype: 'combotemplatelocal',
fieldLabel: 'Agent'.localize(),
store: agentiCombo,
displayField:'NAME',
emptyText:'All agents'.localize(),
tpl: new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">{[fm.capitalize(values.NAME)]}</div></tpl>')
},
{
xtype:'combo',
fieldLabel:'Group'.localize(),
store: grupeCombo,
triggerAction: 'all',
displayField:'SG_DESC',
typeAhead: true,
emptyText:'All groups'.localize()
},
{
xtype:'combo',
fieldLabel:'Messages'.localize(),
store: porukeCombo,
triggerAction: 'all',
displayField:'STATUSDESC',
typeAhead: true,
emptyText:'All messages'.localize(),
tpl: new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">{[fm.capitalize(values.STATUSDESC)]}</div></tpl>')
}]
},
{
title: '&nbsp;Date&nbsp;'.localize(),
id: 'dateFieldGroup',
labelWidth: 40,
defaults: {
anchor: '-17'
},
items: [
{
xtype: 'radiogroup',
allowBlank: false,
hideLabel: true,
columns: 1,
items: [
{boxLabel: 'Svi dani', name: 'group1', id:'radio1', height: 12, checked: true},
{boxLabel: 'Odre?eni dan', name: 'group1', id:'radio2', height: 12},
{boxLabel: 'Period', name: 'group1', id:'radio3'}
]
}]
},
{
title: '&nbsp;Ostali parametri&nbsp;',
labelWidth: 80,
defaults: {
anchor: '-17'
},
items: [
{
xtype:'textfield',
fieldLabel:'ID kontakta',
id: 'brojRacunaTextfield1',
width:100
},
{
xtype:'textfield',
fieldLabel:'Iznos isplate'
},
{
xtype:'textfield',
fieldLabel:'Iznos isplate'
}]
},
{
xtype: 'panel',
height: 30,
collapsed: false,
layout: 'column',
items: [
{
layout: 'form',
items: [{
xtype:'button',
name: 'submitButton',
text: 'Submit',
height: 28,
width: 90,
handler: function ()
{
searchForm.getForm().submit();
}
}]
},
{

layout: 'form',
items: [{
xtype:'button',
text: 'Reset form',
height: 28,
width: 90,
handler: function () {searchForm.getForm().reset();}
}]
},
{
columnWidth: 1
}]
}]
});Sorry for the excess code, I don't understand why doesn't my submit button do anything. :-? When I click it, it does nothing.

dvuja2
14 Nov 2009, 5:18 AM
Solved, it was the
allowBlank: false,
I just removed it and it works.