Commit 6db059ad authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-2509: Remove undesirable Webform submission confirmation types

parent ff876d0a
......@@ -25,6 +25,20 @@ function uw_sites_all_page_attachments(array &$page) {
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function uw_sites_all_form_webform_settings_confirmation_form_alter(array &$form, \Drupal\Core\Form\FormStateInterface $form_state, string $form_id) {
// 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']);
}
/**
* Implements hook_form_FORM_ID_alter().
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment