# Hack: How to mimic a disabled checkbox

DevFeed: [Hack: How to mimic a disabled checkbox](<https://devfeed.tech/articles/hack-how-to-mimic-a-disabled-checkbox-21221.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2014/09/hack-mimic-disabled-checkboxes/>)

Published: 2014-09-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [HTML](<https://devfeed.tech/topics/html.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [jQuery](<https://devfeed.tech/topics/jquery.md>), [Forms](<https://devfeed.tech/topics/forms.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [css](<https://devfeed.tech/tags/css.md>), [forms](<https://devfeed.tech/tags/forms.md>), [hack](<https://devfeed.tech/tags/hack.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>)

## AI overview

A tutorial explains how to mimic a disabled checkbox while ensuring its value is included in an HTML form submission. The approach temporarily stores and removes existing event handlers, blocks interaction with click and keydown handlers, and applies disabled styling, then restores the handlers and styling when re-enabled.

## Source excerpt

Lorem ipsum dolor sit amet