Skip to content
Snippets Groups Projects
Commit 2ae5f344 authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-2505: Remove undesired Webform configuration

parent 8460840b
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,14 @@ function uw_cfg_common_form_layout_builder_configure_section_alter(array &$form,
$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_admin_config_submissions_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
// Remove undesired features.
unset($form['views_settings']);
}
/**
* Implements hook_form_FORM_ID_alter().
*/
......@@ -68,6 +76,18 @@ function uw_cfg_common_form_webform_settings_confirmation_form_alter(array &$for
// The 'none' type is only useful along with a custom handler which provides
// the confirmation message.
unset($form['confirmation_type']['confirmation_type']['#options']['none']);
// Remove undesired features.
unset($form['confirmation_attributes_container']);
unset($form['back']['back_container']['confirmation_back_attributes_container']);
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function uw_cfg_common_form_webform_settings_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
// Remove undesired features.
unset($form['ajax_settings']);
}
/**
......@@ -78,4 +98,27 @@ function uw_cfg_common_form_webform_settings_form_form_alter(array &$form, FormS
unset($form['form_behaviors']['form_prepopulate_source_entity']);
unset($form['form_behaviors']['form_prepopulate_source_entity_required']);
unset($form['form_behaviors']['form_prepopulate_source_entity_type']);
// Remove undesired features.
unset($form['access_denied']);
unset($form['custom_settings']);
unset($form['form_behaviors']['form_autofocus']);
unset($form['form_behaviors']['form_disable_back']);
unset($form['form_behaviors']['form_novalidate']);
unset($form['form_behaviors']['form_required']);
unset($form['form_behaviors']['form_reset']);
unset($form['form_behaviors']['form_submit_back']);
unset($form['form_settings']['form_attributes']);
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function uw_cfg_common_form_webform_settings_submissions_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
// Remove undesired features.
unset($form['access_denied']);
unset($form['purge_settings']);
unset($form['submission_behaviors']['form_convert_anonymous']);
unset($form['submission_behaviors']['submission_log']);
unset($form['submission_behaviors']['token_update']);
}
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