From ad30a13692dcbd67bc636f390136f97b6690636c Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Fri, 14 Oct 2022 09:05:08 -0400 Subject: [PATCH] ISTWCMS-5880: adding states for group of banner settings --- uw_cfg_common.module | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/uw_cfg_common.module b/uw_cfg_common.module index 94e1c4e1..0cd525a8 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -910,6 +910,17 @@ function uw_cfg_common_form_alter(array &$form, FormStateInterface $form_state, ], ], ]; + + // Set the states for the banner. + $form['group_banner_settings']['#states'] = [ + 'visible' => [ + [ + 'select[name="field_uw_type_of_media"]' => [ + ['value' => 'banner'], + ], + ], + ], + ]; } // If we are on the media upload form, we want to restrict -- GitLab