diff --git a/uw_cfg_common.module b/uw_cfg_common.module index c01b0b7c5766e9559b590f9662c9d91f9c28acd3..987b038418f55ad283ea3779efebce145b2e9386 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -413,6 +413,18 @@ function uw_cfg_common_form_webform_settings_form_alter(array &$form, FormStateI $form['ajax_settings']['#access'] = FALSE; } +/** + * Implements hook_form_FORM_ID_alter(). + * + * Configure admin/structure/webform/manage/WEBFORM_ID/handlers. + */ +function uw_cfg_common_form_webform_handler_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { + // Add help text to 'SEND FROM (WEBSITE/DOMAIN)' in webform email handler. + if ($form['#webform_handler_plugin_id'] === 'email') { + $form['settings']['from']['#description'] = t('This must be an <strong>@uwaterloo.ca</strong> email address for sending to succeed. Please consider using the reply-to email option instead when emails are not limited to campus accounts.'); + } +} + /** * Implements hook_form_FORM_ID_alter(). *