Is there a way to provide a Select All / Check All checkbox for a field that displays multiple checkboxes in Drupal 7?
You can do a form alter. hook_form_alter and attach your js to the form.

$form['#attached']['js'] = array(
  drupal_get_path('module', 'YOURMODULE') . '/YOURMODULE.js',
);


Then add the code as in here