View Full Version : Ext.form.BasicForm.getValues() returns object if form is empty

22 Dec 2009, 2:31 AM
Hi forum,

I'm facing an unexpected behaviour of the above mentioned API method and I'm not sure if this is a bug or intended behaviour. When the above method is called on a form that has no values it will return an object with a property empty string that has a value of "undefined" (comparable to something like this: var a = {"": "undefined"}). Without having too much experiance with extjs, I would expect something as return that is testable with Ext.isEmpty(). Moreover, if the behaviour is intended, what would be the prefered way to test if a form doesn't contain any values at all?

Background: I have a wizard with several form panels and one oft the forms contains only checkboxes where having checked none of the boxes is a valid state.

Thanks in advance,