In GeoExt 2, I have a form with one field and 2 radio buttons. I coded radio buttons to change name of that field to correspond with the convention of GeoExt.
items: [
{
xtype: "numberfield",
itemId: 'parcel',
name: 'parcelAtt__ge',
fieldLabel: 'Parcel Number:'
},
{
xtype: 'radiogroup',
fieldLabel: 'Search type:',
columns: 2,
vertical:true,
items: [
{
boxLabel: 'greater than',
name: 'option',
inputValue: '1',
submitValue: false,
checked: true,
listeners: {
change: function (field, newValue, oldValue) {
if (newValue) myPanel.down('#parcel').inputEl.dom.name = 'parcelAtt__ge';
}
}
},
{
boxLabel: 'lower then',
name: 'option',
inputValue: '2',
submitValue: false,
listeners: {
change: function (field, newValue, oldValue) {
if (newValue) myPanel.down('#parcel').inputEl.dom.name = 'parcelAtt__le';
}
}
},
]
}
],
I can confirm (via Firebug) that above code changes field name in HTML, but when submitting form, GeoExt does not use new field name in setting up OpenLayers Filter.
Any hint or solution?