in ExtJs I have a combobox and several fields on the same form. I want the fields, which start out disabled, to become enabled based on selections in the combo box. In order to do that I have the following:
listeners: { change: {
fn: function (combo, newValue, oldValue, eOpts) {
if (newValue == "amz") {
var amazonFields = this.up('panel').query('#amz1, #amz2, #amz3');
amazonFields[0].disabled = 'false';
amazonFields[1].disabled = 'false';
amazonFields[2].disabled = 'false';
}
}
}
The code works as I expect it to, but the fields stay disabled, can anyone tell me why? Thank you!
The
disabledproperty of the field is read-only. To change its state you need to call thesetDisabledordisablemethods.Also,
'false'is not the same asfalsein JavaScript.