Skip to content
Snippets Groups Projects
Commit fd4a3d6b authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5551: fixing hiding comments for service hours

parent 2a2b2197
No related branches found
No related tags found
2 merge requests!60ISTWCMS-6095 Update maxlength settings for title, text fields and link fields...,!33ISTWCMS-5551 update office hours
......@@ -97,12 +97,12 @@ function _uw_ct_service_get_location_options(): array {
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']);
unset($form['field_uw_service_hours']['widget']['office_hours'][0]['value']['#header']['comment']);
// Step through each of the regular days and remove the comments.
foreach ($form['field_uw_service_hours']['widget']['office_hours'][0]['value'] as $index => $value) {
if (is_int($index)) {
$form['field_uw_service_hours']['widget']['office_hours']['value'][$index]['#field_settings']['comment'] = 0;
$form['field_uw_service_hours']['widget']['office_hours'][0]['value'][$index]['#field_settings']['comment'] = 0;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment