Inheriting from a z3c.form field widget

I need to make the field of a Dexterity behavior read-only under certain circumstances; to do so, I want to override the default widget used for a schema.Bool field and replace it with a custom one that inherits form it and adds this feature.

any hints?

Plone Foundation Code of Conduct