Skip to content
Snippets Groups Projects
Commit df8a541a authored by Lily Yan's avatar Lily Yan Committed by Igor Biki
Browse files

ISTWCMS-5985 Remove all remaining ability to set CSS classes, CSS styles and...

ISTWCMS-5985 Remove all remaining ability to set CSS classes, CSS styles and custom attributes (YAML) for webform elements
parent 898fd325
No related branches found
No related tags found
2 merge requests!301ISTWCMS-5985 Remove all remaining ability to set CSS classes, CSS styles and...,!274Draft: ISTWCMS-5551: fixing office hours display
......@@ -259,10 +259,22 @@ function uw_cfg_common_form_webform_admin_config_submissions_form_alter(array &$
/**
* Implements hook_form_FORM_ID_alter().
*
* Remove wrapper attributes in admin/structure/webform/manage/{webform_id}.
* Remove all ability to set CSS classes, CSS styles and custom attributes
* in admin/structure/webform/manage/{webform_id}.
*/
function uw_cfg_common_form_webform_ui_element_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
// Advanced -> Wrapper Attributes.
$form['properties']['wrapper_attributes']['#access'] = FALSE;
// Advanced -> Element Attributes.
$form['properties']['element_attributes']['#access'] = FALSE;
// Advanced -> Label Attributes.
$form['properties']['label_attributes']['#access'] = FALSE;
// Advanced -> Submission Display -> Display Wrapper Attributes.
$form['properties']['display']['format_attributes']['#access'] = FALSE;
// Advanced -> Summary Attributes.
$form['properties']['summary_attributes']['#access'] = FALSE;
// Advanced -> Title Attributes.
$form['properties']['title_attributes']['#access'] = FALSE;
}
/**
......
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