PDA

View Full Version : Form Reset



parsbin
21 Nov 2011, 2:58 AM
Hi
i have a form with bottom code.
my reset code in one button handler not reseted the values of this form.
what is my wrong?
reset code:

search_form.getform().reset();
form code:

var contact_search = new Ext.form.ComboBox({
id: 'contact_search',
name: 'contact_search',
store: contact_search_store,
allowBlank: true,
displayField:'name',
valueField:'id',
cls: 'textright',
typeAhead: false,
loadingText: '... ?? ??? ?????',
width: 430,
pageSize:10,
tabIndex: 15,
hideTrigger:true,
minChars: 2,
tabIndex:40,
tpl: resultTpl,
itemSelector: 'div.search-item',
enableKeyEvents: true

naveedanjum
21 Nov 2011, 3:35 AM
Kindly post the complete form code. Just make sure that you are getting valid form object. using alert( your_form_name);
If it returns null, chances are you are unable to get reference of your form.