views:

264

answers:

1

I am designing a checkbox for a for and I absolutely cannot have the checkbox to toggle when the user clicks on its label, as this label contains a link to open a small infobox where the user gets to know what he or she is accepting by selecting the checkbox.

How can I disable checkbox toggle when clicking on its label?

The code looks simply like this (this element is inside a FormPanel items list:)

{ xtype:'checkbox', id: 'privacyCheck', fieldLabel: 'I have read, understood and accepted the privacy policy of ABCDE' }

+2  A: 

Instead of using the boxLabel property or field label on the checkbox, create a separate label object next to the checkbox. This should make it easier to manipulate your handler for the label. Otherwise, you will need to dig through the appropriate DOM element for the boxLabel (not pretty) to get at it.

It Grunt