diff --git a/uw_cfg_common.module b/uw_cfg_common.module index ce40c1fc35111ae2ca26646624b007ef0c66eb9f..a18a5645249a824e1227575014f036a9420c3f9f 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -19,3 +19,17 @@ function uw_cfg_common_form_layout_builder_configure_section_alter(array &$form, // Ensuring that the contained width is selected by default. $form['layout_builder_style']['#default_value'] = $form['layout_builder_style']['#default_value'] ?: 'uw-contained-width'; } + +/** + * Implements hook_form_FORM_ID_alter(). + */ +function uw_cfg_common_form_webform_settings_confirmation_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { + // Remove undesirable Webform submission confirmation types. These appear on + // admin/structure/webform/manage/*/settings/confirmation. + // The 'modal' type is just a different way to display the message. Disable + // for consistency. + unset($form['confirmation_type']['confirmation_type']['#options']['modal']); + // The 'none' type is only useful along with a custom handler which provides + // the confirmation message. + unset($form['confirmation_type']['confirmation_type']['#options']['none']); +}