PDA

View Full Version : Disable checkbox toggle on label click ?



Piotr Sobczak
14 Sep 2010, 1:22 AM
Hi,

Is it possible to disable checkbox toggle on fieldLabel click ?

Thx

Condor
14 Sep 2010, 1:36 AM
You could use:

Ext.override(Ext.layout.ContainerLayout, {
fieldTpl: new Ext.Template(
'<div class="x-form-item {itemCls}" tabIndex="-1">',
'<label ' + /*for="{id}" */ 'style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>',
'<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">',
'</div><div class="{clearCls}"></div>',
'</div>',
{
disableFormats: true,
compiled: true
})
});
but this disables any field focussing when clicking on a label.

Piotr Sobczak
14 Sep 2010, 6:33 AM
Thx Condor for quick answer

This solution is ok for me and works perffect