View Full Version : Form#getValues does not use valueField from ComboBox

26 May 2007, 5:29 AM
Ext.form.Form.prototype.getValues should return the valueField from a ComboBox, not the displayed value. The problem occurs because getValues serializes the html form rather than iterating over the items in the form and calling getValue(). I guess you may want this behaviour in some situations, but it does not work with the ComboBox.

Here is an implementation of getValues that uses getValue on the items:

Ext.form.Form.prototype.getValues = function() {
var result = {};

this.items.each(function(field) {
result[field.getName()] = field.getValue();

return result;

26 May 2007, 11:15 AM
You need to provide a hiddenName to your combo and it will work as expected.

26 May 2007, 4:56 PM
Ah, thanks :).