PDA

View Full Version : Displayfield and IE 8



alfa19
20 Sep 2013, 12:17 AM
Hi,

using IE 8 on Win XP give me a problem with displayfield.

In fact displayfields appears as readonly textfield, and not as simply text over form.

Is there a way to resolve?

Thanks.

slemmon
23 Sep 2013, 7:24 AM
To make sure I understand your usage can you provide a test case to show how you're using the displayfield?

alfa19
23 Sep 2013, 10:45 PM
{
xtype: 'form',
...
items: [
{
xtype: 'displayfield'
...
}
]
}

slemmon
30 Sep 2013, 11:35 AM
Ok. Gotcha. Wasn't sure if you were using it in a form or toolbar or just what.

I pulled up the below example in Chrome with ExtJS 3.4.1 and it looks like text to me.



var vp = new Ext.Viewport({
layout: 'fit',
items: [{
xtype: 'form',
items: [{
xtype: 'displayfield',
value: 'Something'
}, {
xtype: 'textfield',
fieldLabel: 'Textfield'
}]
}]
});


When inspected I see the HTML as:


<div id="ext-comp-1003" name="ext-comp-1003" class=" x-form-display-field">Something</div>

prtheei
10 Oct 2014, 12:30 AM
Hi,
What is the solution that you have come up with?
Or is there any workaround?
I am also getting displayfield as read-only text field in form and the height is also not adjustable.
What css or other config properties shoul I use to rectify this problem?
TIA

slemmon
15 Oct 2014, 11:16 PM
Can you share your test case and I'll test along with you to see if I see the error?
Also, what version of ExtJS are you testing with?

prtheei
17 Oct 2014, 7:21 AM
Thank you very much for your reply. I got the fix today morning!
The following was my code


form = new Ext.form.FormPanel({
items : [
{
xtype: 'displayfield',
value: guideline_txt,
fieldLabel: 'Guidelines'
}, {
id: 'field_new_password',
allowBlank: false,
name: 'password',
.
.
}, {
id: 'field_password_repeat',
allowBlank: false,
name: 'password',
.
.
}
],


(a lot of properties here)


defaultType: 'textfield'
}


The problem was with the defaultType.
It was overriding the xtype: 'displayfield'
But this happened only in IE8 and not in IE11, Firefox or Chrome

Very tiny mistake. But took a hell lot of time.
Thanks again slemmon

prtheei
17 Oct 2014, 7:24 AM
And I used ExtJS 3.4.0