---
title: Checkboxes with Exclusive Option
product: Form Library
description: Learn how to use the built-in 'None of the above' option, which deselects all other choices when selected. This demo also shows other built-in exclusive options, such as 'Refuse to Answer' and 'I Don’t Know', and explains how to make any custom choice exclusive.
framework: jQuery
source: https://surveyjs.io/form-library/examples/exclusive-choice-options-for-multiple-choice-question/jquery
index: https://surveyjs.io/form-library/examples/overview.md
---

# Checkboxes with Exclusive Option (jQuery)

Checkbox questions include many choice options, and some of them may require special behavior, such as automatically deselecting all other choices when selected. SurveyJS Form Library supports several predefined exclusive options, including [None](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#showNoneItem), [Don't Know](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#showDontKnowItem), and [Refuse to Answer](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#showRefuseItem). In addition, you can make any custom choice exclusive by setting its `isExclusive` property to `true`. In this demo, the "I work from home" option is custom-marked as exclusive, and the built-in Refuse to Answer option is also enabled&mdash;either will deselect all other choices when selected.

## Files

### `public/index.html`

```html
<div id="surveyElement" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; min-height: 100%; height:100%"></div>
```

### `src/index.css`

```css
/* You can add your custom CSS here. */
```

### `src/index.js`

```js
import $ from "jquery";
import { Model } from "survey-core";
import "survey-js-ui";
import "survey-core/survey-core.min.css";
import "./index.css";
import { json } from "./json";

const survey = new Model(json);
survey.onComplete.add((sender, options) => {
    console.log(JSON.stringify(sender.data, null, 3));
});

$("#surveyElement").Survey({ model: survey });
```

### `src/json.js`

```js
export const json = {
  "elements": [
    {
      "type": "checkbox",
      "name": "transportationModes",
      "title": "How do you usually commute to work?",
      "choices": [
        "Car",
        "Bicycle",
        "Bus",
        "Train",
        {
          "value": "remote",
          "text": "I work from home",
          "isExclusive": true
        }
      ],
      "showRefuseItem": true
    }
  ]
};
```

### `src/theme.js`

```js
export const themeJson = {};
```

### `package.json`

```json
{
  "dependencies": {
    "jquery": "latest",
    "survey-core": "latest",
    "survey-js-ui": "latest"
  }
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/form-library/examples/exclusive-choice-options-for-multiple-choice-question/angular.md)
- [React](https://surveyjs.io/form-library/examples/exclusive-choice-options-for-multiple-choice-question/reactjs.md)
- [Vue 3](https://surveyjs.io/form-library/examples/exclusive-choice-options-for-multiple-choice-question/vue3js.md)
- [Vanilla JS](https://surveyjs.io/form-library/examples/exclusive-choice-options-for-multiple-choice-question/vanillajs.md)
