### [How to Add a Select All Option to a Checkbox Form Field](https://wpforms.com/developers/how-to-add-a-select-all-option-to-a-checkbox-form-field/)

**Published:** August 26, 2020
**Author:** Editorial Team

**Excerpt:** Would you like to add a Select All option to your Checkbox form field? In this tutorial, we'll show you how complete this using JavaScript.

**Content:**

## Introduction

Would you like to add a **Select All** option to your **Checkbox** form field? In some forms, you may have several options for your visitors to choose and you just want to provide an easy option to allow the user to select every option quickly.

By default when using the **Checkbox** form field, you can select as many options as you’d like. But you have to select them manually. Giving the option to bulk select all of the options in your **Checkbox** can save time to complete your form.

In this tutorial, we’ll show you how easy it is to implement this using a small code snippet.

## Creating the form

First, you’ll need to create a new form and then add the **Checkbox** form field to your form with all of your options. If you need help in creating your form, [please see this documentation](https://wpforms.com/docs/creating-first-form/ "Creating Your First Form").

For this tutorial, we’re putting the first checkbox option of **ALL THE THINGS** at the top of the form.

![First add a checkbox form field with options including a  select all option to your checkboxes](https://wpforms.com/wp-content/uploads/2020/08/wpforms-select-all-checkbox-option-create-form.jpg)

## Adding the snippet for the select all option

Now it’s time to add the snippet to your site that will all the select all of the checkbox options when a particular option is clicked.

If you need help in adding snippets to your site, [please see this tutorial](https://wpforms.com/developers/how-to-add-custom-php-or-javascript-for-wpforms/ "How to Add Custom PHP or JavaScript for WPForms").

```

/**
 * Add a select all option to the checkbox
 *
 * @link https://wpforms.com/developers/how-to-add-a-select-all-option-to-a-checkbox-form-field/
 */
 
function wpf_dev_select_all() {
    ?>

**Categories:** Tutorials

**Tags:** Javascript, PHP

---

