Results 1 to 2 of 2

Thread: [FORM ISSUE] Text color of the disabled fields

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Location
    Italy
    Posts
    25
    Vote Rating
    0
      0  

    Default [FORM ISSUE] Text color of the disabled fields

    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:


    problema_form.jpg

    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

  2. #2
    Sencha User
    Join Date
    Apr 2011
    Location
    Italy
    Posts
    25
    Vote Rating
    0
      0  

    Default

    I solved it with this workaround:

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •