How to provide ‘Select all checkboxes’ option in Drupal 7

Drupal has provided Form API’s to create checkboxes easily unfortunately it didn’t offer a select all / deselect all checkboxes option.

But no worries, there are plenty of contributed modules are present in Drupal site which will help us to extend the Drupal functionality.  One of the module which we are going to use it called ‘checkall’ module. Please click the below link to see the module:

The above module gives us “check all” / “toggle” / “uncheck all” actions to the checkbox group. Let’s see how to activate this in a form.

Step 1:

First install and activate the module.

Step 2:

Then ‘Add a new field’ in the Article content type as shown below:


Step 3:

Add some values in the list as shown below:


Step 4:

Finally Enable the below option and in the field settings select ‘Unlimted’:


That’s it you have successfully enabled the checkall option for the check-boxes.

Let’s see how it displays in the article section


That’s it friends, kindly share this post if you liked it.

Add a Comment

Your email address will not be published. Required fields are marked *