PDA

View Full Version : [SOLVED]Problem reseting a field



vizcano
4 Nov 2009, 9:28 AM
Hi

I've got a problem on reseting a field and don't know how to solve it, i try with form.items.items[11].reset(); which its supossed to reset item 11 on my form, but i get that item and all the above reseted, anyone knows why it happens?

Its a fileupload field, and its has to be reseted depending on a combobox

Comboboxcode:


case 'url':
Ext.getCmp('content_news_file').hide();
Ext.getCmp('content_news_url').show(); // .ownerCt
form.findField('url').enable();
form.items.items[11].reset();
newsWindow.buttons[1].disable();


fileUpload reset function:


reset : function() {
Ext.get(this.getFileInputId()).findParentNode("form").reset();
Ext.form.FileUploadField.superclass.reset.call(this);
}


I know Ext.get(this.getFileInputId()).findParentNode("form").reset(); resets the whole form, but i'm asking if there is other way to avoid the whole form being reseting

Thank u so much for your time :)

vizcano
5 Nov 2009, 12:15 AM
Finally i've used Condor's solution at this thread http://www.extjs.com/forum/showthread.php?t=46716