PDA

View Full Version : [FORM ISSUE] Text color of the disabled fields



Zux_
13 Dec 2011, 12:56 AM
Hi,
I have an issue related to the correct display of text color of the disabled fields.
Here's a screenshot from iPad that shows the problem:


29965

As you can see the color of the form title is clearly white, while the color of form values is greyish. The problem seems related to the property "disabled" of input html element, because removing this the fields become white (ex. London). So we force in css with this:


input[disabled], textarea[disabled] {
color: white !important;
}


but the problem remains.
Definition and creation of the form fields have been made dynamically but the result is the same:


items:[{
xtype: 'textareafield', //or selectfield, etc..
name:'fieldname',
disabled:true,
label:'fieldlabel'
},
{
...
}]

Anyone can help me please?
Thanks in advance.

Andrea

Zux_
13 Dec 2011, 7:10 AM
I solved it with this workaround:


Ext.override(Ext.form.Field, { onEnable:function(){
this.fieldEl.dom.readOnly=false;
},

onDisable:function(){
this.fieldEl.dom.readOnly=true;
}
}
);