jQuery Disable and Enable Form Elements Using a Checkbox

Here is a simple little snippet that uses jQuery to enable or disable text input boxes in forms using a checkbox. When disabling the text boxes it prompts you to confirm it so that you don’t accidentally delete your data. This might be useful for forms elements that need to be enabled or disabled when a certain checkbox is checked like in a options page. The code itself is quite self explanatory but please feel free to ask if you are having any problems. This script has now been included in wow playground with new and updated features.

Demo

Please type something into the text input boxes and click on Enable I can only get the demo to work in Chrome and Safari so it might not work in Firefox. If the demo doesn’t work checkout the JSFiddle demo

About

WorldOWeb was initially designed to inform people on new software and security for Windows. Nowadays I post on things I like and come across in the technology world and throw in the occasional tutorial and review. Find out More