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.
Then ‘Add a new field’ in the Article content type as shown below:
Add some values in the list as shown below:
Finally Enable the below option and in the field settings select ‘Unlimted’:
Let’s see how it displays in the article section
That’s it friends, kindly share this post if you liked it.