Mar 28, 2015, 4:47 PM
[CLOSED] Change background color on formfield when it is modified
I am trying to set a background color on a formfield (could textfield, datefield, combobox) using the DirtyCls class. I am using the Gray theme. however this is changing the background color of the entire cell including the label and cell. I just want the input box to change.
In version 1.x of Ext.Net I used to have a listerner to check for ValidityChange and call the following code but this also highlighting the entire cell. can you advise on some ways to accomplish my requirement.
thanks
In version 1.x of Ext.Net I used to have a listerner to check for ValidityChange and call the following code but this also highlighting the entire cell. can you advise on some ways to accomplish my requirement.
thanks
var checkFields = function(form) {
form.getForm().getFields().items.forEach(function (f)
{
if (undefined == f.originalValue || undefined == f.getValue()) {
}
else if (f.isFormField && f.originalValue.toString() != f.getValue().toString()) {
f.getEl().addCls("dirty-field")
}
else {
f.getEl().removeCls("dirty-field");
}
});
}
Last edited by Daniil; Mar 30, 2015 at 3:35 PM.
Reason: [CLOSED]