-
15 Feb 2009 8:19 AM #1
Extjs Form.getValues
Extjs Form.getValues
Hi, All
When I callI get all the form values.Code:this.form.getValues(false)
But again among these field values I have several date fields declared like
Would like to get these objects as Javascript Date instances when I callCode:{ fieldLabel :'Exam Date', name :'examDate', xtype:'datefield', format:'d-m-y' }Code:this.form.getValues(false)
Thanks,
DJ
-
15 Feb 2009 8:25 AM #2
That won't work out of the box. This is getValues method:
PHP Code:getValues : function(asString){
var fs = Ext.lib.Ajax.serializeForm(this.el.dom);
if(asString === true){
return fs;
}
return Ext.urlDecode(fs);
},
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
15 Feb 2009 8:34 AM #3
Hmm. Then how can I walk through the input components in a form ? I have seen the API documentation for BasicForm & FormPanel. But I didn't see a method like that

-
15 Feb 2009 8:36 AM #4
BasicForm has property items that holds all fields. You can use form.item.each(...) method.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video


Reply With Quote