/checkboxfix

jQuery plugin to make checkboxes submit values when unchecked.

Primary LanguagePHP

CheckboxFix

Always return checkbox values on submitted forms.

Features

  1. Easy to use; just add an expando attribute off="".
  2. Maintains attributes and look of checkbox.
  3. Handles change events.
  4. Handles form resets.

Usage

Implicit, returning specified string when unchecked.

  1. Create a normal checkbox but add an off="string" attribute.

    Some old browsers may reject the extra attributes.

Explicit, submit empty string when unchecked

  1. Create a normal checkbox.
  2. Call $().checkboxfix() on the checkbox.

Explicit, submit specified string when unchecked

  1. Create a normal checkbox.
  2. Call $().checkboxfix('string') on the checkbox.