diff --git a/uw_ct_service.module b/uw_ct_service.module index f861674003ac58f3cc8275307eafd425512ee875..5e32e768ed9de1b8e4f4a7bd6f3942a25bdd3e19 100644 --- a/uw_ct_service.module +++ b/uw_ct_service.module @@ -95,6 +95,17 @@ function _uw_ct_service_get_location_options(): array { * Implements hook_form_FORM_ID_alter(). */ function uw_ct_service_form_node_uw_ct_service_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { + + // Unset the table header for comments in the regular days. + unset($form['field_uw_service_hours']['widget']['office_hours']['value']['#header']['comment']); + + // Step through each of the regular days and remove the comments. + foreach ($form['field_uw_service_hours']['widget']['office_hours']['value'] as $index => $value) { + if (is_int($index)) { + $form['field_uw_service_hours']['widget']['office_hours']['value'][$index]['#field_settings']['comment'] = 0; + } + } + // Add locations pre-fill menu. $form['group_service_location']['location_presets_select'] = [ '#title' => t('Location lookup'),