# Switch

**Switch** controls are ideal for visually indicating mutually exclusive states - such as active/inactive, yes/no.

**Data type**: `boolean`

### Adding a Switch control

1\. Edit your sheet\
2\. Click on the **Qommentary Form** extension\
3\. Expand **Input fields** section\
4\. Click on **Add input field**

![](https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUSRPWcyYI4YAL7ad9DIS%2Fuploads%2Ffat9r1sCT4MHhobkvP7B%2Fimage.png?alt=media\&token=d5960bed-6a40-4b04-8773-751f92b0f4bd)

5\. Select **Switch** from the dropdown menu

![](https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUSRPWcyYI4YAL7ad9DIS%2Fuploads%2FCnxhIllvFuYN7dPRoCi7%2Fimage.png?alt=media\&token=cea78f83-143b-4d27-897c-6bcdffdddf7d)

6\. Add a **label** to display in the form

![](https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUSRPWcyYI4YAL7ad9DIS%2Fuploads%2FWS59uCDPhfbAiC5hT3r3%2Fimage.png?alt=media\&token=4384be84-6fc0-43a9-8372-7c0917b8b39c)

7\. Add a **field** name

![](https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUSRPWcyYI4YAL7ad9DIS%2Fuploads%2FJYfwxizwpMm54HAvP21p%2Fimage.png?alt=media\&token=f2c9841c-2d78-45d6-95e3-ad3a8fac8253)

{% hint style="danger" %}
If database is selected as data connection, then field name **must map** to destination table column name.
{% endhint %}

{% hint style="warning" %}
Field name cannot contain spaces.
{% endhint %}

8\. Click on **Done**

**Switch** input column can now be updated and saved.

![](https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUSRPWcyYI4YAL7ad9DIS%2Fuploads%2FkcQh33objrNi0FydTimA%2Fimage.png?alt=media\&token=19776c98-0248-42c4-b780-b7b80adba301)

### Customizing column width

Input columns have a set width by default. If you wish to change the column width, please follow these steps:

1\. Edit your sheet\
2\. Click on the **Qommentary Writeback** extension\
3\. Expand **Input Column** section\
4\. Locate the **Column width** property

<div align="left"><img src="https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZDJXBPujnEslrwotv6%2F-MZDMKp4nLaBy5IYUHON%2Fimage.png?alt=media&#x26;token=fc4479d8-ee70-43c1-976e-9abc55bedcad" alt=""></div>

5\. Drag the slider to adjust the column width

<div align="left"><img src="https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ90EIKtNZ2VjrnYFQ-%2F-MZAAMpAXfEWAmU2bfz4%2Fimage.png?alt=media&#x26;token=bb9af150-f97d-49bc-a18f-ca1faf5dd7b2" alt=""></div>

4\. Alternatively, you can enter a specific value in the **Custom column width** field

<div align="left"><img src="https://3028830514-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ90EIKtNZ2VjrnYFQ-%2F-MZAAZ3qrMZoe0U7VUxs%2Fimage.png?alt=media&#x26;token=be40bae3-ecea-4aef-acae-9db423ae5c82" alt=""></div>
