View Full Version : Ext.form.getValues() and setValues() mismatch

19 Jun 2007, 8:14 AM
Ext.form.getValues() returns an object with keys as field names and values as field values. Ext.form.setValues() accepts the same kind of object. The expectation is that you can store a form's values with getValues() and later restore the values using setValues().

However this does not work for checkboxes. Ext.form.getValues() returns a value of "on" for a checked checkbox. However, when Ext.form.setValues() calls Ext.form.Checkbox.setValue() it does not accept "on" as meaning "checked".

The simplest fix seems to be to accept "on" as equivalent to "true" in Ext.form.Checkbox.setValue().



19 Jun 2007, 8:59 AM
Makes sense to me. I have changed it to accept "on".