# 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: [Forms](<https://devfeed.tech/topics/forms.md>), [jQuery](<https://devfeed.tech/topics/jquery.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>)

Tags: [asp-net](<https://devfeed.tech/tags/asp-net.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>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [jquery](<https://devfeed.tech/tags/jquery.md>)

## AI overview

The excerpt describes a workaround for disabled checkboxes in ASP.NET WebForms: HTML forms omit disabled fields from POST data, so the server cannot process their values. Instead of setting the disabled state, save and remove the element's existing handlers, block click and keydown events, and apply styling to make it look disabled. To re-enable it, remove the blocking handlers, restore the saved handlers, and remove the styling. The excerpt notes that existing jQuery listeners still fire and points to a jsFiddle for the full code.

## Source excerpt

Lorem ipsum dolor sit amet