Generates a group of checkboxes and their associated labels.
Notes:
- The items associative array passed to this method should be keyed by the labels used, with the values being the associated value in the checkbox.
- To properly capture the values selected at the server end, the name should be suffixed by the array push string “[]”
Parameters:
-
The name attribute of all of the input elements in the HTML code.
-
The BASE id of each of the input elements in the HTML code. This will be suffixed by the values in the items array (sanitized with dashes), to ensure that all checkboxes have a meaningful ID.
-
An associative array of the checkbox values, keyed by the labels to be used.
-
An array or comma separated value string of the checked values.
-
HTML code to insert before each checkbox.
-
HTML code to insert after each checkbox.
-
Boolean $disabled = false
Whether all checkboxes should be disabled.