$checked = true; echo ilUtil::formCheckbox("checkbox_var", "Checkbox Label", $checked);
$checked = false; $options = array( 1 => "Option 1", 2 => "Option 2", 3 => "Option 3" ); echo ilUtil::formCheckboxGroup("checkbox_var", "Checkbox Group Label", $options, $checked);This example creates a group of HTML form checkboxes with the label "Checkbox Group Label", and options "Option 1", "Option 2", and "Option 3". The initial state of all checkboxes is set as unchecked.